Skip to main content

Posts

Showing posts with the label rowfilter

Concatenating RowFilter orFilters with andFilter in Java

All the questions pertaining this don't seem to answer the particular question I have. My problem is this. I have a list of search terms, and for each term I find the edit distance to find possible misspelling of a word. So for each word separated by a space, I have possible words each word could be. For example: searching for green chilli might give us "fuzzy" words "green, greene and grain" and "chilli, chill and chilly". Now I want the RowFilter to search for: "green OR greene OR grain" AND "chilli OR chill OR chilly". I can't seem to find a way to do this in Java. I've looked all over the place but nothing talks about concatenating the OR and AND filters together in one RowFilter. Would I have to roll my own solution based on the model? I suppose I can do this, but my method would most probably be naive at first and slow. Any pointers as to how to roll my own solution for this or better yet, what's th