Full text search and JOIN


#1

I want to JOIN result of FTS to another document types , how is possible

I know an approach can be CURL in N1QL but for some reason I am searching for another solution


#2

Simpler way to do it in N1QL will be in the upcoming release.

Until then…

  1. You can do it in the app itself.
  2. Store the result of FTS in a doc/documents. Then do the simpler N1QL join.
  3. For very simple search, you can use tokens(). The indexes can be quite large and has limitations. https://dzone.com/articles/more-than-like-efficient-json-search-with-couchbas

#3

@socketman2016 With FTS today, you can setup multiple FTS indexes over different document types. You can then setup an FTS alias covering all your FTS indexes. Queries against the FTS alias will fetch you results from across all the FTS indexes (which is a JOIN in essence).