RE: Storing a field as byte[[]

2010-05-13 Thread Uwe Schindler
There is a class NumericField in the same package. - Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: u...@thetaphi.de > -Original Message- > From: Saurabh Agarwal [mailto:srbh.g...@gmail.com] > Sent: Friday, May 14, 2010 4:55 AM > To: java-user@lucene

Re: Storing a field as byte[[]

2010-05-13 Thread Saurabh Agarwal
hi Ian but when I see lucene-3.0.0/src/java/org/apache/lucene/document/Field.java all the constructors either take a String ad value or a byte [] array as a value. Can u guide me that how to use NumericField or am I missing something? Thanks Saurabh Agarwal On Fri, May 14, 2010 at 1:33 AM, Ian

Re: Will doc ids ever change if nothing is deleted?

2010-05-13 Thread Nigel
Yes, I realize that storing document IDs persistently (for example) is a Bad Idea. Partly I'm asking just to make sure I understand what's going on. There is a use case, though. In some cases between when we do a search and return some doc ids, and when we use those doc ids to load some documents

Re: Will doc ids ever change if nothing is deleted?

2010-05-13 Thread Erick Erickson
Why do you care? That is, what do you want to accomplish that makes document ID renumbering relevant? In general, it is unwise to rely on Lucene-assigned document IDs. If you need an invariant document ID, assign it yourself. If this is off base, could you supply your use-case? Best Erick On Th

Will doc ids ever change if nothing is deleted?

2010-05-13 Thread Nigel
The FAQ clearly states that document IDs will not be re-assigned unless something was deleted. http://wiki.apache.org/lucene-java/LuceneFAQ#When_is_it_possible_for_document_IDs_to_change.3F However, a number of other emails and posts I've read mention that renumbering occurs when segments are merg

Seattle Hadoop/NoSQL: Facebook, more Discussion. Thurs May 27th

2010-05-13 Thread Bradford Stephens
We've heard your feedback from the last meetup: we're having less speakers and more discussion. Yay! http://www.meetup.com/Seattle-Hadoop-HBase-NoSQL-Meetup/ We're expecting: 1. Facebook will talk about Hive (a SQL-like language for MapReduce) 2. OpsCode will talk about cluster management with Ch

Re: Storing a field as byte[[]

2010-05-13 Thread Ian Lea
You can store byte arrays, but you can't search on them. For integers you can either pad them out with leading zeros or use NumericField. If you use NumericField you'll need to use NumericRangeQuery as well. -- Ian. On Thu, May 13, 2010 at 8:44 PM, Saurabh Agarwal wrote: > Hi, > I am new to lu

Storing a field as byte[[]

2010-05-13 Thread Saurabh Agarwal
Hi, I am new to lucene. the constructors in Feild show that I can give the value as byte[] I wanted to ask if I store a integer as a byte array the how it will ve searched during search say file size!!! because if I use text format the range search will be poor say fs of 10 12 20 30 50 100 101 102

Re: Error of the code

2010-05-13 Thread Ian Lea
What does vector.size() return? You don't appear to be doing anything with the String term in "for ( String term : vector.getTerms() )" - presumably you intend to. -- Ian. On Thu, May 13, 2010 at 1:16 PM, manjula wijewickrema wrote: > Dear Ian, > > Thanks a lot for your immediate reply. As you

Re: Error of the code

2010-05-13 Thread manjula wijewickrema
Dear Ian, Thanks a lot for your immediate reply. As you have mentioned I replaced the lines as follows. IndexReader ir=IndexReader.open(directory); TermFreqVector vector=ir.getTermFreqVector(0,"fieldname"); Now the error has been vanished and thanks for it. But I can't still see the results al

Re: How to influence the score in lucene 2.9

2010-05-13 Thread Ian Lea
An alternative, if you want the date to influence rather than determine the score, is to use document boosting, with the boost value set small for old docs and high for new docs. You would probably need to play to find suitable values. One problem would be that a doc that is recent today will be

Re: Error of the code

2010-05-13 Thread Ian Lea
You need to replace this: TermFreqVector vector = IndexReader.getTermFreqVector(0, "fieldname" ); with IndexReader ir = whatever(...); TermFreqVector vector = ir.getTermFreqVector(0, "fieldname" ); And you'll need to move it to after the writer.close() call if you want it to see the doc you've

Error of the code

2010-05-13 Thread manjula wijewickrema
Dear All, I am trying to get the term frequencies (through TermFreqVector) of a document (using Lucene 2.9.1). In order to do that I have used the following code. But there is a compile time error in the code and I can't figure it out. Could somebody can guide me what's wrong with it. Compile time

Re: Class_for_HighFrequencyTerms

2010-05-13 Thread manjula wijewickrema
thanks On Tue, May 11, 2010 at 3:31 PM, wrote: > Sounds like your path is messed up and you're not using maven correctly. > Start with the jar version that contains the class you require and use maven > pom to correctly resolve dependencies > Adam > Sent using BlackBerry® from Orange > > -Or

RE: Unsupported operation in DocIdSetIterator using lucene 2.9

2010-05-13 Thread Uwe Schindler
> I am using lucene 2.9 and I can't understand why a succession of > un-deprecated methods calls a deprecated method in this class. > The series of calls is as follows: > > Searcher.search(Query, Collector) > IndexSearcher.search(Weight, Filter, Collector) > Scorer.score(Collector) > DocIdSetItera