Why not add an extra column for 'site created synonym tags' and fill it at 
index 
time using server side code? Then just include the tag field in the search.

 Dennis Gearon


Signature Warning
----------------
It is always a good idea to learn from your own mistakes. It is usually a 
better 
idea to learn from others’ mistakes, so you do not have to make them yourself. 
from 'http://blogs.techrepublic.com.com/security/?p=4501&tag=nl.e036'


EARTH has a Right To Life,
otherwise we all die.



----- Original Message ----
From: Jonathan Rochkind <rochk...@jhu.edu>
To: "solr-user@lucene.apache.org" <solr-user@lucene.apache.org>
Sent: Tue, November 23, 2010 7:10:28 PM
Subject: RE: own way synonyms

One way synonym at index time. 

java, python, php => programming

No synonyms at query time.  So the terms "java", "python" and "php" all get 
indexed as both their original word and the token "programming".  Then a query 
including the token "programming" will match those. 


Oops, wait, except I think that synonym decleration above will NOT actually 
preserve the original eg "java" token too. We want both "java" and 
"programming" 
to be in the index, at the same term position, so it will still match on query 
'java' too.  I think the synonym filter should be able to do that, but now I'm 
confused. But if you can figure out how to do an index-time synonym that still 
preserves the original token at the same token position, and simply do NOT do a 
query time synonym expansion, that will do what you want. It's possible the 
synonym filter wont' do that, and it needs some java hacking. 


________________________________________
From: solruser2010 [basement_add...@yahoo.com]
Sent: Tuesday, November 23, 2010 5:33 PM
To: solr-user@lucene.apache.org
Subject: Re: own way synonyms

a better example might be this:

When someone searches on "programming" i want it to return results with java
OR python OR php but I don't want a search for "java" to return documents
with php


programming,java,php,python

--
View this message in context: 
http://lucene.472066.n3.nabble.com/own-way-synonyms-tp1956755p1957124.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to