I use FTS to query my database to increase the search speed, since I need to also search in the text description,
When I try to execute a query using a single column, it works fine, as shown below
select * from productsearch where productsearch match ('prod_name:panasonic*tw*')
And
select * from productsearch where productsearch match ('prod_short_desc:samsung*s5*')
So, above both queries give the expected result, but when I try to combine both queries using the OR operator, it gives me no result
select * from productsearch where productsearch match ('prod_name:panasonic*tw* OR prod_short_desc:samsung*s5*')
So, I want to know if I am not doing something wrong with this when using the OR operator to search multiple columns
UPDATE
The below request works fine, but it doesnโt meet my requirement,
select * from productsearch where productsearch match ('prod_name:panasonic* OR prod_short_desc:samsung*')
You can see that if I delete several tokens, then its working tone is fine with the OR operator.
android sqlite full-text-search fts4
Lalit poptani
source share