lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shalin Shekhar Mangar <shalinman...@gmail.com>
Subject Re: Questions about synonyms and highlighting
Date Wed, 07 Oct 2009 09:08:06 GMT
I'm not an expert on hit highlighting but please find some answers inline:

On Wed, Sep 30, 2009 at 9:03 PM, Nourredine K. <nourredine_k@yahoo.com>wrote:

> Hi,
>
> Can you please give me some answers for those questions :
>
> 1 - How can I get synonyms found for  a keyword ?
>
> I mean i search "foo" and i have in my synonyms.txt file the following
> tokens : "foo, foobar, fee" (with expand = true)
> My index contains "foo" and "foobar". I want to display a message in a
> result page, on the header for example, only the 2 matched tokens and not
> "fee"  like "Results found for foo and foobar"
>
>
Whatever token is available in the index, will be matched but I don't think
it is possible to show only those synonyms which matched some documents.
Adding debugQuery=on can give you some more information like how the score
for a particular document was calculated for the given query.


> 2 - Can solR make analysis on an index to extract associations between
> tokens ?
>
> for example , if "foo" often appears with "fee" in a field, it will
> associate the 2 tokens.
>
>
Solr won't compute associations but there are ways of achieving something
similar. For example, the MoreLikeThis functionality clusters related
documents through co-occurrence of terms in a given field. Also, the
TermVectorComponent can give you position information for terms in a
document. You can use that to build your own co-occurrence associations.

If you just want to query for two words within a fixed position difference,
you can do proximity matches.

http://lucene.apache.org/java/2_9_0/queryparsersyntax.html#Proximity%20Searches

Perhaps somebody else can weigh on your question #3 and #4.

-- 
Regards,
Shalin Shekhar Mangar.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message