How to search on analyzed fields

#1

I have a table test with field column1. whitespace analyzer on column1 (showing two rows in table test)

column1
this is first row
this is row first

when I query, select * from table where match(column1, 'this is first'). it gives me 2 rows instead of 1. Any idea where I am doing it wrong or is there a way to get a single row in such a case (this is first row only)
Note: Due to some memory limitations I cannot apply keyword analyzer here.

0 Likes

#2

Found the solution for the above,
https://crate.io/docs/crate/reference/en/latest/general/dql/fulltext.html#match-predicate.

For exact match, query would be
select * from table where match(column1, 'this is first') using phrase

0 Likes