You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by hsp <pi...@hotmail.com> on 2016/02/01 14:44:01 UTC
Phrase searches that includes stopword does not work with
BrazilianAnalizer
Hi All,
I did search all forums here for something like the situation I am facing
on, without success.
Well, I use a system with a repository provided by Jackrabbit (verson 2.10),
and it uses Lucene 3.6 in underground to do index and searching.
There is no contribution so far for my question in their nabble forum, so I
came here to get some help from this community core.
The case is:
The lucene is configured to use the BrazilianAnalyzer.
After create the content:
doc1) with the phrase: "esta raposa está de brincadeira comigo"
There is the following stopwords: "esta", "está", "de"
doc2) with the phrase: "raposa brincadeira comigo"
no stopwords...
I did a test code and attached the index folder generated for your analysis.
If I search for the phrase: "esta raposa está de brincadeira comigo"
Just the "doc2)" document returns. Would return the two documents, right?
The same occurs if I search for:"brincadeira comigo".
Opening the index with Luke 3.5, I saw that there is the following content
indexed:
"null_1 rapos null_2 brincadeir comig" and I did not find what means the
"null_x" that it is putting instead the stopwords. I do not know if is the
"null_x" the guilt for the problem.
I hope for any help/collaboration/direction from you guys, because without
the search phrase in my system it is useless in some functions.
Regards!
Helio.
index.zip <http://lucene.472066.n3.nabble.com/file/n4254403/index.zip>
index.zip <http://lucene.472066.n3.nabble.com/file/n4254403/index.zip>
--
View this message in context: http://lucene.472066.n3.nabble.com/Phrase-searches-that-includes-stopword-does-not-work-with-BrazilianAnalizer-tp4254403.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: Phrase searches that includes stopword does not work with
BrazilianAnalizer
Posted by hsp <pi...@hotmail.com>.
Hi Luis Felipe, thanks by your response.
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
and did alter the lines in method
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.
--
View this message in context: http://lucene.472066.n3.nabble.com/Phrase-searches-that-includes-stopword-does-not-work-with-BrazilianAnalizer-tp4254403p4256470.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: Phrase searches that includes stopword does not work with BrazilianAnalizer
Posted by finx <oi...@gmail.com>.
Hi Helio, sorry for the delay.
I don't know jackrabbit, so I don't know if I can help you...
But even so, I think the problem is not in Lucene itself - I've created a
simple class with your example and it works just fine, returning both
documents. The code is here: http://pastebin.com/RaXjsMHM (you can copy and
paste into your project)
Let me know if I can help you somehow.
Luis
Abraços,
Luis Felipe - Finx
On Tue, Feb 2, 2016 at 2:49 AM, hsp <pi...@hotmail.com> wrote:
> Hi finx, thanks by your collaboration,
>
> No problem, my test code is for use with the jackrabbit api 2.10, ok?
>
> The expression search is with xpath grammar.
>
> For this reason I have put the index attached.
>
> The project is attached for your inspection.
>
> Best Regards.
> Helio.
>
> jackrabbit-firsthops.zip
> <http://lucene.472066.n3.nabble.com/file/n4254624/jackrabbit-firsthops.zip
> >
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Phrase-searches-that-includes-stopword-does-not-work-with-BrazilianAnalizer-tp4254403p4254624.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
Re: Phrase searches that includes stopword does not work with
BrazilianAnalizer
Posted by hsp <pi...@hotmail.com>.
Hi finx, thanks by your collaboration,
No problem, my test code is for use with the jackrabbit api 2.10, ok?
The expression search is with xpath grammar.
For this reason I have put the index attached.
The project is attached for your inspection.
Best Regards.
Helio.
jackrabbit-firsthops.zip
<http://lucene.472066.n3.nabble.com/file/n4254624/jackrabbit-firsthops.zip>
--
View this message in context: http://lucene.472066.n3.nabble.com/Phrase-searches-that-includes-stopword-does-not-work-with-BrazilianAnalizer-tp4254403p4254624.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: Phrase searches that includes stopword does not work with BrazilianAnalizer
Posted by finx <oi...@gmail.com>.
Hi Helio,
If I search for the phrase: "esta raposa está de brincadeira comigo"
> Just the "doc2)" document returns. Would return the two documents, right?
I think it depends of your query... could you share your test code, too?
Thanks,
Luis
On Mon, Feb 1, 2016 at 5:44 AM, hsp <pi...@hotmail.com> wrote:
> Hi All,
>
> I did search all forums here for something like the situation I am facing
> on, without success.
> Well, I use a system with a repository provided by Jackrabbit (verson
> 2.10),
> and it uses Lucene 3.6 in underground to do index and searching.
> There is no contribution so far for my question in their nabble forum, so I
> came here to get some help from this community core.
>
> The case is:
> The lucene is configured to use the BrazilianAnalyzer.
> After create the content:
>
> doc1) with the phrase: "esta raposa está de brincadeira comigo"
> There is the following stopwords: "esta", "está", "de"
>
> doc2) with the phrase: "raposa brincadeira comigo"
> no stopwords...
>
> I did a test code and attached the index folder generated for your
> analysis.
>
> If I search for the phrase: "esta raposa está de brincadeira comigo"
> Just the "doc2)" document returns. Would return the two documents, right?
>
> The same occurs if I search for:"brincadeira comigo".
>
> Opening the index with Luke 3.5, I saw that there is the following content
> indexed:
> "null_1 rapos null_2 brincadeir comig" and I did not find what means the
> "null_x" that it is putting instead the stopwords. I do not know if is the
> "null_x" the guilt for the problem.
>
> I hope for any help/collaboration/direction from you guys, because without
> the search phrase in my system it is useless in some functions.
>
> Regards!
> Helio.
>
>
> index.zip <http://lucene.472066.n3.nabble.com/file/n4254403/index.zip>
> index.zip <http://lucene.472066.n3.nabble.com/file/n4254403/index.zip>
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Phrase-searches-that-includes-stopword-does-not-work-with-BrazilianAnalizer-tp4254403.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>