Document frequency for all documents found by a query
Hi there I'm using Solr to do some category mapping, and part of this process consists of finding frequently occuring terms for each category id. My index consists of a number of documents (mostly containing between 1 and 4 tokens), and a category id that this document belongs to. Ideally I'd like to generate document frequencies for each term restricted by category, but when I use the following http request it gives me the frequencies over the whole index (ignoring the category ids). http://localhost:8983/solr/select?qt=tvrh&q=category_id:9&fl=x&tv.all=true&rows=1000 Is it possible to make Solr return document frequency over just the documents returned from the query? If not what is the proper way to do this? Thanks, Tomek Rej
Re: Document frequency for all documents found by a query
Nevermind I just discovered faceting which does exactly what I want. Sorry about that. On Thu, Sep 15, 2011 at 11:31 AM, Tomek Rej wrote: > Hi there > > I'm using Solr to do some category mapping, and part of this process > consists of finding frequently occuring terms for each category id. > My index consists of a number of documents (mostly containing between 1 and > 4 tokens), and a category id that this document belongs to. > Ideally I'd like to generate document frequencies for each term restricted > by category, but when I use the following http request it gives me the > frequencies over > the whole index (ignoring the category ids). > > http://localhost:8983/solr/select?qt=tvrh&q=category_id:9&fl=x&tv.all=true&rows=1000 > > Is it possible to make Solr return document frequency over just the > documents returned from the query? If not what is the proper way to do this? > > Thanks, > Tomek Rej >
Error loading ICUTokenizerFactory
Hi everyone I'm getting an exception when trying to use the solr.ICUTokenizerFactory: SEVERE: org.apache.solr.common.SolrException: Error loading class 'solr.ICUTokenizerFactory' The code in the schema.xml that isn't working is: I copied the jar files found in contrib/analysis-extras/lib and contrib/analysis-extras/lucene-lib/lucene-libs to the solr/lib directory of my project, which is what I assume you have to do from reading some posts I found online. However I must be doing something wrong as I'm getting the error even with the jar files in my solr/lib directory. When the above didn't work I tried changing solrconfig.xml to add extra lib directives: When I read the output on the command line it said the class loader was able to load the jar files but I still got the same error loading class 'solr.ICUTokenizerFactory' Does anyone know what I'm doing wrong? Thanks for your help. -- *Tomek Rej** *| Developer *roamz** **23 Foster Street* *Surry Hills NSW 2010 Australia*** *M* +61 431 829 593 *E* tomek.rej @roamz.com * ***
Re: Error loading ICUTokenizerFactory
Looks like another person had the same problem as me. The solution to the issue can be found here: http://lucene.472066.n3.nabble.com/Solr-3-1-ICU-filters-error-loading-class-td2835323.html Perhaps the person in charge of the documentation could add apache-solr -analysis-extras-X.Y.jar as a requirement. -- *Tomek Rej** *| Developer *roamz** **23 Foster Street* *Surry Hills NSW 2010 Australia*** *M* +61 431 829 593 *E* tomek.rej @roamz.com * ***