You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by "O. Klein" <kl...@octoweb.nl> on 2011/12/24 13:20:56 UTC

Highlight with multi word synonyms

Copy pasted following text from lucene mailing list as it describes my
problem:

" I'm trying to use multi-word synonyms. For example in my synonyms file I
have nhl, national
hockey league. If I do this index only, a search for nhl returns a correct
match, but highlights
the first word only, national. Ideally, it would highlight national hockey
league or not highlight
at all. If I do the synonyms at both index and query time, it finds the
match and does the
correct highlighting, but I understand it is not ideal to do synonyms at
index and query time.
I am expanding synonyms and using edismax. Thoughts? "

I really only want to use synonym expansion on index only, but this
behaviour makes that impossible.

Please advise.

--
View this message in context: http://lucene.472066.n3.nabble.com/Highlight-with-multi-word-synonyms-tp3610466p3610466.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: How to test solr filter

Posted by Chris Hostetter <ho...@fucit.org>.
: References: <13...@n3.nabble.com>
:  <4E...@r.email.ne.jp>
: In-Reply-To: <4E...@r.email.ne.jp>
: Subject: How to test solr filter

https://people.apache.org/~hossman/#threadhijack
Thread Hijacking on Mailing Lists

When starting a new discussion on a mailing list, please do not reply to 
an existing message, instead start a fresh email.  Even if you change the 
subject line of your email, other mail headers still track which thread 
you replied to and your question is "hidden" in that thread and gets less 
attention.   It makes following discussions in the mailing list archives 
particularly difficult.


-Hoss

Re: How to test solr filter

Posted by Rafał Kuć <r....@solr.pl>.
Hello!

Take a look at the TestStopFilterFactory class in the
org.apache.solr.analysis package of core/test in Solr.


-- 
Regards,
 Rafał Kuć
 http://solr.pl

> Dear, 

> I have done some changes on StopFilterFactory. I would like to test
> these changes using java class to simulate Solr engine. What are the
> required steps in order to do this ? 

> Regards, 




How to test solr filter

Posted by Momo_Lelo <ga...@hotmail.com>.
Dear, 

I have done some changes on StopFilterFactory. I would like to test these changes using java class to simulate Solr engine. What are the required steps in order to do this ? 

Regards, 

Re: Highlight with multi word synonyms

Posted by "O. Klein" <kl...@octoweb.nl>.
I am using Solr 4.0 and after reindexing with LUCENE_33 I got the behaviour
for highlighting I want. So yeah, I can confirm this is a bug.



Koji Sekiguchi wrote
> 
> (11/12/24 21:20), O. Klein wrote:
>> Copy pasted following text from lucene mailing list as it describes my
>> problem:
>>
>> " I'm trying to use multi-word synonyms. For example in my synonyms file
>> I
>> have nhl, national
>> hockey league. If I do this index only, a search for nhl returns a
>> correct
>> match, but highlights
>> the first word only, national. Ideally, it would highlight national
>> hockey
>> league or not highlight
>> at all. If I do the synonyms at both index and query time, it finds the
>> match and does the
>> correct highlighting, but I understand it is not ideal to do synonyms at
>> index and query time.
>> I am expanding synonyms and using edismax. Thoughts? "
>>
>> I really only want to use synonym expansion on index only, but this
>> behaviour makes that impossible.
>>
>> Please advise.
> 
> I think this is a bug.
> 
> I can reproduce the same problem with Solr 4.0. But if I set
> <luceneMatchVersion>LUCENE_33</luceneMatchVersion> in solrconfig.xml and
> re-index, the problem is gone.
> 
> What version of Solr are you using? Can you try LUCENE_33 and report the
> result?
> 
> koji
> -- 
> http://www.rondhuit.com/en/
> 


--
View this message in context: http://lucene.472066.n3.nabble.com/Highlight-with-multi-word-synonyms-tp3610466p3612118.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Highlight with multi word synonyms

Posted by "O. Klein" <kl...@octoweb.nl>.
Thanx!

Not looking at Lucene project I totally missed that.

Keep up the good work.

--
View this message in context: http://lucene.472066.n3.nabble.com/Highlight-with-multi-word-synonyms-tp3610466p3644729.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Highlight with multi word synonyms

Posted by Koji Sekiguchi <ko...@r.email.ne.jp>.
(12/01/09 21:51), O. Klein wrote:
> Koji, maybe you missed my confirmation due to the hijacking of the thread.
>
> I am using Solr 4.0 and after reindexing with LUCENE_33 I got the behaviour
> for highlighting I want. So yeah, I can confirm this is a bug.
>
> Looking forward to a fix :)
>

The fix of the problem has been done. See:

https://issues.apache.org/jira/browse/LUCENE-3668

koji
-- 
http://www.rondhuit.com/en/

Re: Highlight with multi word synonyms

Posted by "O. Klein" <kl...@octoweb.nl>.
Koji, maybe you missed my confirmation due to the hijacking of the thread.

I am using Solr 4.0 and after reindexing with LUCENE_33 I got the behaviour
for highlighting I want. So yeah, I can confirm this is a bug. 

Looking forward to a fix :)


Koji Sekiguchi wrote
> 
> (11/12/24 21:20), O. Klein wrote:
>> Copy pasted following text from lucene mailing list as it describes my
>> problem:
>>
>> " I'm trying to use multi-word synonyms. For example in my synonyms file
>> I
>> have nhl, national
>> hockey league. If I do this index only, a search for nhl returns a
>> correct
>> match, but highlights
>> the first word only, national. Ideally, it would highlight national
>> hockey
>> league or not highlight
>> at all. If I do the synonyms at both index and query time, it finds the
>> match and does the
>> correct highlighting, but I understand it is not ideal to do synonyms at
>> index and query time.
>> I am expanding synonyms and using edismax. Thoughts? "
>>
>> I really only want to use synonym expansion on index only, but this
>> behaviour makes that impossible.
>>
>> Please advise.
> 
> I think this is a bug.
> 
> I can reproduce the same problem with Solr 4.0. But if I set
> <luceneMatchVersion>LUCENE_33</luceneMatchVersion> in solrconfig.xml and
> re-index, the problem is gone.
> 
> What version of Solr are you using? Can you try LUCENE_33 and report the
> result?
> 
> koji
> -- 
> http://www.rondhuit.com/en/
> 


--
View this message in context: http://lucene.472066.n3.nabble.com/Highlight-with-multi-word-synonyms-tp3610466p3644439.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Highlight with multi word synonyms

Posted by Koji Sekiguchi <ko...@r.email.ne.jp>.
(11/12/24 21:20), O. Klein wrote:
> Copy pasted following text from lucene mailing list as it describes my
> problem:
>
> " I'm trying to use multi-word synonyms. For example in my synonyms file I
> have nhl, national
> hockey league. If I do this index only, a search for nhl returns a correct
> match, but highlights
> the first word only, national. Ideally, it would highlight national hockey
> league or not highlight
> at all. If I do the synonyms at both index and query time, it finds the
> match and does the
> correct highlighting, but I understand it is not ideal to do synonyms at
> index and query time.
> I am expanding synonyms and using edismax. Thoughts? "
>
> I really only want to use synonym expansion on index only, but this
> behaviour makes that impossible.
>
> Please advise.

I think this is a bug.

I can reproduce the same problem with Solr 4.0. But if I set
<luceneMatchVersion>LUCENE_33</luceneMatchVersion> in solrconfig.xml and
re-index, the problem is gone.

What version of Solr are you using? Can you try LUCENE_33 and report the result?

koji
-- 
http://www.rondhuit.com/en/