You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by hsp <pi...@ibest.com.br> on 2016/01/28 18:03:09 UTC

Phrase searches not working with BrazilianAnalizer

I am digging into this issue (for me is what it is), and to get some
appreciation from of you, there is a little java project with a class
FirstHops.java where there is a main to execute. Run that as a example where
I am trying to explain why the phrase search is not working the way I think
it should. I do not know if it is only Lucene issue related or if it is
jackrabbit code, but for me the result is that, to summarize:

I am using BrazilianAnalyser in my project, and in all phrase that there is
stopwords between two words makes the phrase search without results for
that.


If I am not being that clear enough let me know and I will try to give more
examples to you realize where it gets.

(sorry by my bad english...)

The output after run the project will be:





--
View this message in context: http://jackrabbit.510166.n4.nabble.com/Phrase-searches-not-working-with-BrazilianAnalizer-tp4663594.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

Re: Phrase searches not working with BrazilianAnalizer

Posted by hsp <pi...@ibest.com.br>.
Since noone could help me ;-) , 

I am just posting here to let you know what I did to solve my "problem".

Last week I tested with a hint based in

http://lucene.472066.n3.nabble.com/Why-PhraseQuery-translate-stopwords-to-quot-quot-td4105761.html#a4105887
<http://lucene.472066.n3.nabble.com/Why-PhraseQuery-translate-stopwords-to-quot-quot-td4105761.html#a4105887http://>  

and did alter the lines in method

 BrazilianAnalyzer.createComponents()

  //result = new StopFilter(matchVersion, result, stopwords);
  // to
  result = new StopFilter(false, result, stopwords, false);


And with this the index is now searching as expected, independently if there
is/isn't a stop word betwen terms in original phrase indexed.

If anyone knows about some consequences by doing this "fix" , please let me
know.

Best Regards!
Helio. 

Output in my test code after alter the code in BrazilianAnalyzer




--
View this message in context: http://jackrabbit.510166.n4.nabble.com/Phrase-searches-not-working-with-BrazilianAnalizer-tp4663594p4663675.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

Re: Phrase searches not working with BrazilianAnalizer

Posted by hsp <pi...@ibest.com.br>.
Some help, no?



--
View this message in context: http://jackrabbit.510166.n4.nabble.com/Phrase-searches-not-working-with-BrazilianAnalizer-tp4663594p4663602.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.