Re: term frequency in solr

2017-01-05 Thread Ahmet Arslan
Hi, I guess you are working with default techproducts. can you try using the terms request handler: query.setRequestHandler("terms") Ahmet On Friday, January 6, 2017 1:19 AM, huda barakat wrote: Thank you for fast reply, I add the query in the code but still not working:

Re: term frequency in solr

2017-01-05 Thread huda barakat
Thank you for fast reply, I add the query in the code but still not working: import java.util.List; import org.apache.solr.client.solrj.SolrClient; import org.apache.solr.client.solrj.SolrQuery; import org.apache.solr.client.solrj.SolrR

Re: term frequency in solr

2017-01-05 Thread Ahmet Arslan
Hi, I think you are missing the main query parameter? q=*:* By the way you may get more response in the sole-user mailing list. Ahmet On Wednesday, January 4, 2017 4:59 PM, huda barakat wrote: Please help me with this: I have this code which return term frequency from techproducts example:

Re: term frequency

2016-11-28 Thread huda barakat
This the error I get it is the same: Exception in thread "main" java.lang.NullPointerException at solr_test.solr.SolrJTermsApplication.main(SolrJTermsApplication.java:30) I know the object is null but I don't know why it is null?? when I change the query to this: SolrQuery query = new SolrQue

Re: term frequency

2016-11-24 Thread Jason Wee
the exception line does not match the code you pasted, but do make sure your object actually not null before accessing its method. On Thu, Nov 24, 2016 at 5:42 PM, huda barakat wrote: > I'm using SOLRJ to find term frequency for each term in a field, I wrote > this code but it is not working: > >

Re: term frequency on a particular query

2011-06-07 Thread Ian Lea
http://www.gossamer-threads.com/lists/lucene/java-user/86299 looks relevant. -- Ian. On Tue, Jun 7, 2011 at 10:05 AM, G.Long wrote: > Hi :) > > In my index, there are documents like : > > doc { question: 1, response: 1, word: excellent } > doc { question 1, response: 1, word: great } > doc { q

Re: Term Frequency for phrases

2010-01-08 Thread Erick Erickson
What are the associated Analyzers for your Gene and Token? Because if they're NOT something akin to KeywordAnalyzer, you have a problem. Specifically, most of the "regular" tokenizers will break this stream up into three separate terms, "brain", "natriuetic", and "peptide". If that's the case, the

Re: Term Frequency for phrases

2010-01-08 Thread Jason Rutherglen
I'm not going to go into too much code level detail, however I'd index the phrases using tri-gram shingles, and as uni-grams. I think this'll give you the results you're looking for. You'll be able to quickly recall the count of a given phrase aka tri-gram such as "blue_shorts_burough" On Fri, J

Re: Term Frequency for phrases

2010-01-08 Thread hrishim
@All : Elaborating the problem The phrase is being indexed as a single token ... I have a Gene tag in the xml document which is like brain natriuretic peptide This phrase is present in the abstract text for the given document . Code is as : doc.add(new Field("Gene", geneName, Field.Store.YES

Re: Term Frequency for phrases

2010-01-08 Thread Grant Ingersoll
When do you detect that they are phrases? During indexing or during search? On Jan 8, 2010, at 5:16 AM, hrishim wrote: > > Hi . > I have phrases like brain natriuretic peptide indexed as a single token > using Lucene. > When I calculate the term frequency for the same the count is 0 since the

Re: Term Frequency for phrases

2010-01-08 Thread Erick Erickson
On a quick read, your statements are contradictory <<>> <<>> Either "brain natriuretic peptide" is a single token/term or it's not Are you sure you're not confusing indexing and storing? What analyzer are you using at index time? Erick On Fri, Jan 8, 2010 at 5:16 AM, hrishim wrote:

Re: Term Frequency for phrases

2010-01-08 Thread Michael McCandless
Issue a PhraseQuery and count how many hits came back? Is that too slow? If so, you could detect all phrases during indexing and add them as tokens to the index? Mike On Fri, Jan 8, 2010 at 5:16 AM, hrishim wrote: > > Hi . > I have phrases like brain natriuretic peptide indexed as a single tok

Re: Term Frequency vector consumes memory

2009-07-02 Thread Grant Ingersoll
ant Ingersoll" To: Sent: Tuesday, June 30, 2009 9:48 PM Subject: Re: Term Frequency vector consumes memory In Lucene, a Term Vector is a specific thing that is stored on disk when creating a Document and Field. It is optional and off by default. It is separate from being able to get th

Re: Term Frequency vector consumes memory

2009-06-30 Thread Ganesh
er to load term vector. I want to switch off this feature? Is that possible without re-indexing? Regards Ganesh - Original Message - From: "Grant Ingersoll" To: Sent: Tuesday, June 30, 2009 9:48 PM Subject: Re: Term Frequency vector consumes memory > In Lucene, a Term Ve

Re: Term Frequency vector consumes memory

2009-06-30 Thread Grant Ingersoll
In Lucene, a Term Vector is a specific thing that is stored on disk when creating a Document and Field. It is optional and off by default. It is separate from being able to get the term frequencies for all the docs in a specific field. The former is decided at indexing time and there is

Re: term frequency normalization

2009-02-12 Thread Chris Hostetter
: The easiest way to change the tf calculation would be overwriting : tf in an own implementation of Similarity like it's done in : SweetSpotSimilarity. But the average term frequency of the : document is missing. Is there a simple way to get or calc this : number? there was quite a bit of discus

Re: Term Frequency and IndexSearcher

2009-01-16 Thread Chris Hostetter
: References: : : <1998.130.159.185.12.1232021837.squir...@webmail.cis.strath.ac.uk> : Date: Thu, 15 Jan 2009 04:49:49 -0800 (PST) : Subject: Term Frequency and IndexSearcher http://people.apache.org/~hossman/#threadhijack Thread Hijacking on Mailing Lists When starting a new discussion

Re: Term Frequency and IndexSearcher

2009-01-15 Thread Murat Yakici
Hi Paul, I am tempted to suggest the following ( I am assuming here that the document and the particular fields are TFVed when indexing): For every doc in the result set: - get the doc id - using the doc id, get the TermFreqVector of this document from the index reader (tfv=ireader.getTermFr

RE: Term Frequency for more complex terms

2008-07-03 Thread John Griffin
Matthew, I not totally sure what you are asking but if it's 'where do I call the explain method from?' it looks like you want to call it from the IndexSearcher class. Look at the API docs for Searcher (the IndexSearcher's superclass). John G. P.S. If that's not it, look for explain in the API do

Re: term frequency calculation in Lucene

2007-04-30 Thread karl wettin
29 apr 2007 kl. 18.33 skrev saikrishna venkata pendyala: Where does the lucene compute term frequency vector ? {filename,function name} DocumentWriter.java private final void invertDocument(Document doc) Actually the task is to replace the all term frequencies with some constant number(

Re : term frequency calculation in Lucene

2007-04-29 Thread saikrishna venkata pendyala
Hai , Where does the lucene compute term frequency vector ? {filename,function name} Actually the task is to replace the all term frequencies with some constant number(integer), how to do this ? Any kind of help is appreciated . Thanks in advance.

Re: Term frequency

2007-04-12 Thread Doron Cohen
karl wettin <[EMAIL PROTECTED]> wrote on 12/04/2007 00:25:47: > > 12 apr 2007 kl. 09.12 skrev sai hariharan: > > > Thanx for replying. In my scenario i'm not going to index any of my > > docs. > > So is there a way to find out term frequencies of the terms in a doc > > without doing the indexing p

Re: Term frequency

2007-04-12 Thread karl wettin
12 apr 2007 kl. 09.12 skrev sai hariharan: Thanx for replying. In my scenario i'm not going to index any of my docs. So is there a way to find out term frequencies of the terms in a doc without doing the indexing part? Using an analyzer (Tokenstream) and a Map? while ((t = ts.next)!=null)

Re: Term frequency

2007-04-12 Thread sai hariharan
Hi, Thanx for replying. In my scenario i'm not going to index any of my docs. So is there a way to find out term frequencies of the terms in a doc without doing the indexing part? Thanx in advance, Hari On 4/12/07, Grant Ingersoll <[EMAIL PROTECTED]> wrote: Add Term Vectors to your Field durin

Re: Term frequency

2007-04-11 Thread Grant Ingersoll
Add Term Vectors to your Field during indexing. See the Field constructors. To get a Term Vector out, see IndexReader.getTermFreqVector method. -Grant On Apr 11, 2007, at 3:23 PM, sai hariharan wrote: Hi, I've just started using Lucene. Can anybody assist me in calculating the term frequ

Re: Term Frequency within Hits

2007-03-08 Thread Chiradeep Vittal
riginal Message From: Erick Erickson <[EMAIL PROTECTED]> To: java-user@lucene.apache.org Sent: Wednesday, March 7, 2007 2:29:14 PM Subject: Re: Term Frequency within Hits See TermFreqVector, HitCollector, perhaps TopDocs, perhaps TermEnum. Make sure you create your index such that freque

Re: Term Frequency within Hits

2007-03-07 Thread Erick Erickson
See TermFreqVector, HitCollector, perhaps TopDocs, perhaps TermEnum. Make sure you create your index such that frequencies are stored (see the FAQ). Erick On 3/7/07, teramera <[EMAIL PROTECTED]> wrote: So after I execute a search I end up with a 'Hits' object. The number of Hits is the order