On Sun, Apr 3, 2016 at 11:49 AM, Uncharted <[email protected]> wrote: > Hello > > I'm testing the fulltext search feature with lucene and trying to figure out > how to use it. > I did some small tests : > > Search with the exact word: > select from color where name lucene 'silber' : > OK > select from color where name lucene 'test silber test' : OK > > Fuzzy search with the tilde "~" > select from color where name lucene 'siilbeer~0.7' : OK > select from color where name lucene 'test siilbeer~0.7 test' : OK > > Search with compound word : > select from color where name lucene '"mineralsilber" : KO > select from color where name lucene "mineralsilber~0.2" : KO > > > As you can see, it seems the basic search is not very good with compound > words or when whitespace is stripped between two words > > How can I do a search with compound words ? > I found on google that the ngrams were the way to go in those cases: but is > it possible to use it with OrientDb/Lucene ? and how ?
First of all I need to know which version of orient are you using. Search behaviour depends upon the analyzer configured. The default analyzer is the StandardaAnalyzer: http://lucene.apache.org/core/5_5_0/analyzers-common/org/apache/lucene/analysis/standard/StandardAnalyzer.html Compound words analysis is supported by https://lucene.apache.org/core/5_1_0/analyzers-common/org/apache/lucene/analysis/compound/DictionaryCompoundWordTokenFilter.html At the moment we don't support dictionaries, but it is possible to configure the analyzer for the index: http://orientdb.com/docs/last/Full-Text-Index.html#analyzer So, it is possible to create your own analyzer, add the jar to the orient lib dir and configure index to use it. -- Best regards, Roberto Franchini OrientDB LTD - http://orientdb.com -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
