Phrase synonyms not working | Synonyms not in search results
We are facing following issues with our Solr 1.3.0 : 1. Phrase synonym not working – Search for multi word terms (phrase) is not working for our Solr configuration. Be it a one-way synonym or two-way, it’s not working for a phrase. For phrase search, we are enclosing the term as well as the synonyms in double quotes i.e. the phrase ‘cute cat’ is entered as “cute cat” with quotes in synonyms.txt file. The synonyms are also enclosed in quotes like “little cat” with quotes. When we perform a search for “cute cat” with quotes, we get the results for ‘cute cat’ but not for ‘little cat even if it is defined as a synonym. However, if we define a single word as synonym for a set of synonyms, we get all the expected results i.e. if we define a set of synonyms as ‘”cute cat”, “little cat”, ”felines”’, a search for “felines” with quotes or without quotes will provide us a result which will include the results for “little cat”, “cute cat” and “feline” but a search on “little cat” or “cute cat” will return the result containing the search results for the precise term used for search. When searching for a phrase without quotes, we get all the results for the individual words and combination of words, just the regular search result. We need the search results for the precise combination of words in the phrase along with the synonyms for the phrase. The “expand” parameter is currently set to “true” but setting it to false also did not help with phrase synonym search. We are using the DisjunctionMaxQueryParser. 2. Search results not correct when a term is searched as a phrase – As per our requirements, when a term is searched as a phrase, i.e. enclosed in double quotes, it should return results pertaining to that specific word. The results should not contain the search results for the synonyms of the search term. However, we are getting the results for the terms defined as the synonyms also. Has anybody got some experience with similar kind of problems? For our first problem, we are looking for some configuration settings in schema.xml which may help us getting the phrase synonyms work. -- View this message in context: http://www.nabble.com/Phrase-synonyms-not-working-%7C-Synonyms-not-in-search-results-tp25104201p25104201.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: response issues with ruby and json
The spellcheck issue needs to be resolved. It doesn't seem like a good idea to access facet.fields by position though - there has never been any guarantee about the order that these come back in, and additional ones could be added as default parameters for example. -Yonik http://www.lucidimagination.com On Thu, Aug 20, 2009 at 10:54 PM, Matt Mitchellgoodie...@gmail.com wrote: Hi, I was using the spellcheck component a while ago and noticed that parts of the response are hashes, that use duplicate keys. This is the issue here: http://issues.apache.org/jira/browse/SOLR-1071 Also, the facet/facet_fields response is a hash, where the keys are field names. This is mostly fine BUT, when eval'd in Ruby, the resulting key order is not consistent; I think this is pretty normal for most languages. It seems to me that an array of hashes would be more useful to preserve the ordering? For example, we have an application that uses a custom handler that specifies the facet fields. It'd be nice if the response ordering could also be controlled in the solrconfig.xml I guess I have 2 questions: 1. Does anyone if the spellcheck component going to get updated so there are not duplicate keys 2. How could we get the facet fields into arrays instead of hashes for the ruby response writer? Should I submit a patch? Is this important to anyone else? I guess the alternative is to use the xml response. Thanks, Matt
Re: Implementing a logout
Just clarifying : My query was more specific to Solr. I wanted to check if there are any Solr resources that are session-specific that we need to release. * I can't understand: do you use several web applications in a same container? Are you trying to close shared SolrCore when one of many users (of another application) logs off?* I have only one application that is built on top of Solr. I mentioned SolrCore in my mail only because that was the only object that I noticed which had a close() method. I don't intend to do a close() on SolrCore when a particular user logs out (closes his session) * There is no 'logout'. There is no permanent state in Solr beyond the Lucene index. There are caches, but these do not require any termination. The Lucene API has very solid self-protection for the indexes and Solr uses the API in the right way.* I understand Solr application does not have a logout. Please correct me if I am wrong but you seem to be stating that there is no explicit action required from our side to release any Solr resources when a user terminates his/her session of a Solr based application. If that is the case, then my query is answered. Thank you all. Regards Rahul On Sun, Aug 23, 2009 at 7:16 AM, Lance Norskog goks...@gmail.com wrote: Sorry, hit 'send' too soon. You can kill the servlet process, but it is much better to use the servlet container's shutdown protocol. On Sat, Aug 22, 2009 at 6:46 PM, Lance Norskog goks...@gmail.com wrote: There is no 'logout'. There is no permanent state in Solr beyond the Lucene index. There are caches, but these do not require any termination. The Lucene API has very solid self-protection for the indexes and Solr uses the API in the right way. If you run a Solr distribution in a standard servlet container, you can just use the servlet's shutdown protocol. If you call a commit with waitFlush=true, then do not index any records, you can kill the servlet process. On Fri, Aug 21, 2009 at 7:45 AM, Fuad Efendi f...@efendi.ca wrote: I can't understand: do you use several web applications in a same container? Are you trying to close shared SolrCore when one of many users (of another application) logs off? Usually one needs to clean up only user-session specific objects (such as non-persistent shopping cart)... -Original Message- From: Rahul R [mailto:rahul.s...@gmail.com] Sent: August-21-09 1:20 AM To: solr-user@lucene.apache.org Subject: Implementing a logout Hello, Can somebody give me some pointers on the Solr objects I need to clean up/release while doing a logout on a Solr Application. I find that only the SolrCore object has a close() method. I typically do a lot of faceting queries on a large dataset with my application. I am using Solr 1.3.0. Regards Rahul -- Lance Norskog goks...@gmail.com -- Lance Norskog goks...@gmail.com
Re: response issues with ruby and json
Thanks Yonik. Yeah the additional facet fields being added by the client do make it a little more complicated. Matt On Sun, Aug 23, 2009 at 12:47 PM, Yonik Seeley yo...@lucidimagination.comwrote: The spellcheck issue needs to be resolved. It doesn't seem like a good idea to access facet.fields by position though - there has never been any guarantee about the order that these come back in, and additional ones could be added as default parameters for example. -Yonik http://www.lucidimagination.com On Thu, Aug 20, 2009 at 10:54 PM, Matt Mitchellgoodie...@gmail.com wrote: Hi, I was using the spellcheck component a while ago and noticed that parts of the response are hashes, that use duplicate keys. This is the issue here: http://issues.apache.org/jira/browse/SOLR-1071 Also, the facet/facet_fields response is a hash, where the keys are field names. This is mostly fine BUT, when eval'd in Ruby, the resulting key order is not consistent; I think this is pretty normal for most languages. It seems to me that an array of hashes would be more useful to preserve the ordering? For example, we have an application that uses a custom handler that specifies the facet fields. It'd be nice if the response ordering could also be controlled in the solrconfig.xml I guess I have 2 questions: 1. Does anyone if the spellcheck component going to get updated so there are not duplicate keys 2. How could we get the facet fields into arrays instead of hashes for the ruby response writer? Should I submit a patch? Is this important to anyone else? I guess the alternative is to use the xml response. Thanks, Matt
RE: Implementing a logout
Truly correct: - SOLR does not create HttpSession for user access to Admin screens (do we have any other screens of UI?) - SolrCore is shared object; closing it and reopening for each user session is extremely expensive; this object requires gigabytes of RAM in even simplest scenario User doesn't have any session with SOLR based application. User may have session with different application, and this one may use resources provided by SOLR. release any SOLR resources - no need. Of course, user session may store pointers to thousands documents retrieved via SOLR query, - just close the session object. I understand Solr application does not have a logout. Please correct me if I am wrong but you seem to be stating that there is no explicit action required from our side to release any Solr resources when a user terminates his/her session of a Solr based application. If that is the case, then my query is answered.