jakesays-old / thrudb

Automatically exported from code.google.com/p/thrudb
0 stars 1 forks source link

[Patch] Support for multiple analyzers #15

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
(Already posted on the mailing list, but I realized it may not be the right
place to send patches)

Here is a patch to support multiple analyzers in text queries.
Supported analyzers are (all analyzers found in lucene-core-2.4.1.jar) :
 - org.apache.lucene.analysis.standard.StandardAnalyzer  (default)
 - org.apache.lucene.analysis.KeywordAnalyzer
 - org.apache.lucene.analysis.SimpleAnalyzer
 - org.apache.lucene.analysis.StopAnalyzer
 - org.apache.lucene.analysis.WhitespaceAnalyzer

I removed the "keyword_fields"  field in SearchQuery struct because this
patch resolve the keywords-in-queries problem.

Original issue reported on code.google.com by Madma...@gmail.com on 25 May 2009 at 3:57

Attachments:

GoogleCodeExporter commented 9 years ago
thanks very much for this.  i've been busy with the holiday but I'll take a 
look tonight.

Original comment by jake%3.r...@gtempaccount.com on 25 May 2009 at 6:44

GoogleCodeExporter commented 9 years ago
couple of issues with the patch.

1. fields should allow a analyzer to be specifier. this helps the indexing.
2. Keyword field type should be removed since it will be part of the 
fieldAnalyzer list.

I'll add these tomorrow and commit the fix. thanks again!

Original comment by jake%3.r...@gtempaccount.com on 27 May 2009 at 3:20

GoogleCodeExporter commented 9 years ago
Thanks for the review, theses issues are fixed now :)
I made a fork on github and commit my changes, you'll see a pull request.

Original comment by Madma...@gmail.com on 27 May 2009 at 1:26