Re: Facet query return zero hits if category facet value has 2 or more words (looks like space does not work)
On Jun 6, 2009, at 9:52 PM, Thanh Doan wrote: webapp=/solr path=/select params={facet=truefl=pk_i,scorefacet.mincount=1q=([*+TO+*]+AND+* cat2_facet:Top+Wear*)+AND+ (type_s:Item )facet .limit =-1facet.field=cat1_facetfacet.field=cat2_facetqt=standardwt=ruby} *hits=0* status=0 QTime=10 ... Have you ever used a string facet field in which the facet value contains 2 or more words like Brand:Hewlett Packard If yes, what the query looks like exactly to filter the results based on the facet value = 'Hewlett Packard'? If you have spaces in a string type field and need to query on it, you must surround it by quotes: cat2_facet:Top Wear You also need to be sure to escape any characters that can cause trouble with the query parser. One tip from the query you have, separate out the facet drill in clause to an fq parameter: fq=cat2_facet:Top Wear - it'll allow Solr to cache those separately. Erik
Dismax request handler and highlighting
Hello, I am having problems with the dismax request handler and highlighting. The following query works as intended http://localhost:8983/solr/select?indent=onq=myquerystart=0rows=10fl=id%2Cscoreqt=standardwt=standardhl=truehl.fl=myfield whereas http://localhost:8983/solr/select?indent=onq.alt=myquerystart=0rows=10fl=id%2Cscoreqt=dismaxwt=standardhl=truehl.fl=myfield I am using dismax since i need boost functions. Furthermore, using the q parameter with dismax doesn't seem to work with me, debug gives the following output str name=querystringmyquery/str str name=parsedquery+() ()/str is there a setting somewhere that i need to set? I am building SOLR right out of svn. Thanks, Fouad
Re: Query Filter fq with OR operator
On Fri, Jun 5, 2009 at 5:33 PM, Yao Ge yao...@gmail.com wrote: If I want use OR operator with mutile query filters, I can do: fq=popularity:[10 TO *] OR section:0 Is there a more effecient alternative to this? There is not currently a more efficient way to do this. But esp with multi-select support now in Solr, it starts making more sense to figure out a way to support OR filters. Possible future solutions... (stuff that belongs on solr-dev) one could perhaps that the parts of a boolean query be cached separately: fq={!cache=sep}fq=popularity:[10 TO *] OR section:0 Or, we could even support specifying the OR clauses separately, correlating them with a tag: fq={!grp=a}fq=popularity:[10 TO *] fq={!grp=a}section:0 If we want the latter, we need to keep in mind how it would interact with excluding certain filters during faceting... i.e. one part could be excluded and the other part not. Seems doable though. The other part of the puzzle is how to pass this info around (for example, search routines take a ListQuery for filters). Perhaps the easiest way is to create a SolrQuery class that wraps a query and gives extra processing instructions such as caching the clauses separately. -Yonik http://www.lucidimagination.com
searchcomponent howto ...
I'm trying to write a very simple SearchComponent that performs a simple operation on the query string before passing through to QueryComponent. The EncodingSearchComponent will perform something like the following Base64(MD5(querystring))
Re: creating new fields at index time - is it possible?
Now that I plan on adding new fields based on the data already present, it would be best to read the existing field after it has been processed (cleaned up) by the other analyzers. I was therefore planning on creating a custom analyzer that is started after the other default ones have been run; said analyzer would read the field and add new ones based on several rules and some data. I have been told that UpdateRequestProcessor probably cannot be invoked from an analyzer. Is there any way for an analyzer to add new fields? It would be enough to just populate them: I could add empty fields to the original document, and define for them analyzers that read the data of other fields previously analyzed and populate the empty field. Thanks to anyone that may have answers to my questions. =) Best regards, G. Noble Paul നോബിള് नोब्ळ्-2 wrote: If you wish to plugin your code try this http://wiki.apache.org/solr/UpdateRequestProcessor -- View this message in context: http://www.nabble.com/creating-new-fields-at-index-time---is-it-possible--tp23741267p23916728.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Dismax request handler and highlighting
I had the same problem - I think the answer is that highlighting is not currently supported with q.alt and dismax. http://www.nabble.com/bug--No-highlighting-results-with-dismax-and-q.alt%3D*%3A*-td23438048.html#a23438048 -Peter On Sun, Jun 7, 2009 at 7:51 AM, Fouad Mardinif.mard...@gmail.com wrote: Hello, I am having problems with the dismax request handler and highlighting. The following query works as intended http://localhost:8983/solr/select?indent=onq=myquerystart=0rows=10fl=id%2Cscoreqt=standardwt=standardhl=truehl.fl=myfield whereas http://localhost:8983/solr/select?indent=onq.alt=myquerystart=0rows=10fl=id%2Cscoreqt=dismaxwt=standardhl=truehl.fl=myfield I am using dismax since i need boost functions. Furthermore, using the q parameter with dismax doesn't seem to work with me, debug gives the following output str name=querystringmyquery/str str name=parsedquery+() ()/str is there a setting somewhere that i need to set? I am building SOLR right out of svn. Thanks, Fouad -- Peter M. Wolanin, Ph.D. Momentum Specialist, Acquia. Inc. peter.wola...@acquia.com
Re: Use the same SQL Field in Dataimporthandler twice?
what is ${db.tableA.id} ? I think there is something extra in that can you paste the whole data-config.xml? can you paste On Sun, Jun 7, 2009 at 1:09 AM, gateway0reiterwo...@yahoo.de wrote: Hi, I tried to do the following: field column=id name=db_id/ entity name=comment dataSource=db query=select com_text from comment where ftype=1 and fid='${db.tableA.id}' field column=com_text name=comment/ /entity So I use the SQL Table Field id twice once for db_id in my index and for the sql query as fid=id. That doesn´t work! But when I change the query from fid=id to like fid=otherkey it does work! Like: field column=id name=db_id/ entity name=comment dataSource=db query=select com_text from comment where ftype=1 and fid='${db.tableA.otherkey}' field column=com_text name=comment/ /entity Is there any other kind of a workaround so I can use the SQL Field id twice as I wanted to? Thanks kind regards, Sebastian -- View this message in context: http://www.nabble.com/Use-the-same-SQL-Field-in-Dataimporthandler-twice--tp23904968p23904968.html Sent from the Solr - User mailing list archive at Nabble.com. -- - Noble Paul | Principal Engineer| AOL | http://aol.com