Re: how use ranges for numeric values?

2008-09-19 Thread Umesh Prasad
On Fri, Sep 19, 2008 at 6:30 PM, Umesh Prasad <[EMAIL PROTECTED]> wrote: > > Hi, >NumberTools provides method longToString(long l) which pads the values. > It can be indexed and range search like normal queries. > > Slight issue is when you search view the index in Luke because the numbers > a

Re: lucene Front-end match

2008-09-19 Thread Matthew Hall
To be more specific (just in case you are new to lucene) Your Query: Query query = qp.parse("bbb:\"b*\" AND ccc:\"cc*\""); What I think you actually want here: Query query = qp.parse("bbb:b* AND ccc:cc*"); Give it a shot, and then like I said, go get Luke, it will help you tremendously ^^

Re: lucene Front-end match

2008-09-19 Thread Matthew Hall
The reason the wildcard is being dropped is because you have wrapped it in a phrase query. Wildcards are not supported in Pharse Queries. At least not in any Analyzers that I'm aware of. A really good tool to see the transformations that happen to a query is Luke, open it up against your ind

Re: lucene Front-end match

2008-09-19 Thread 叶双明
I am sorry, just put the string to QueryParser. But what make me confusing the code: Query query = qp.parse("bbb:\"b*\" AND ccc:\"cc*\""); doesn't work as i have expected. It drop the Wildcard *. 2008/9/19, 叶双明 <[EMAIL PROTECTED]>: > > Thanks! > > Now, I just use Query query = qp.parse("a*"); a

Re: could I implement this scenario?

2008-09-19 Thread Glen Newton
> I think it is not good idea to use lucene as storage, it is just index. I strongly disagree with this position. To qualify my disagreement: yes, you should not use Lucene as your primary storage for your data in your organization. But, for a particular application, taking content from your pri

Re: how use ranges for numeric values?

2008-09-19 Thread Umesh Prasad
Hi, NumberTools provides method longToString(long l) which pads the values. It can be indexed and range search like normal queries. Slight issue is when you search view the index in Luke because the numbers are hexadecimal notation and so not easily understandable. Hence you may want to store t

Re: Case Sensitivity

2008-09-19 Thread Andrzej Bialecki
Michael McCandless wrote: Anthony Urso wrote: On Thu, Aug 28, 2008 at 11:16 AM, Michael McCandless <[EMAIL PROTECTED]> wrote: Yonik Seeley wrote: I wasn't originally going to add a Field.Index at all for omitNorms, but Doug suggested it. The problem with this type-safe way of doing things

RE: Using separate index for each user

2008-09-19 Thread Jimi Hullegård
Well, if the total size of the relevant data is to big to fit in one single index, then simply adding the username as a field would not solve the original problem. But what if you combine the two alternaties? Lets say that you can find a way to divide the users in a evenly distributed way based

Re: Case Sensitivity

2008-09-19 Thread Michael McCandless
Anthony Urso wrote: On Thu, Aug 28, 2008 at 11:16 AM, Michael McCandless <[EMAIL PROTECTED]> wrote: Yonik Seeley wrote: I wasn't originally going to add a Field.Index at all for omitNorms, but Doug suggested it. The problem with this type-safe way of doing things is the combinatorial explos

Re: Using separate index for each user

2008-09-19 Thread Alexander Aristov
IF you create a field in the index which would hold username then you can create search queries to reject entries which don;t belong to the user? it's much efficient Alexander 2008/9/16 Tobias Larsson Hult <[EMAIL PROTECTED]> > Hi, > > We're thinking of using Lucene to integrate search in a b

Re: how use ranges for numeric values?

2008-09-19 Thread Ian Lea
Hi The comparison is on strings, so, yes, you do have to pad your values. -- Ian. On Fri, Sep 19, 2008 at 10:51 AM, Giannandrea Castaldi <[EMAIL PROTECTED]> wrote: > Hi, > I need to specify in my query ranges with product price. I wonder if > the only solution is padding values with zeros. F

Re: WildCardQuery and TooManyClauses

2008-09-19 Thread Konstantyn Smirnov
Konstantyn Smirnov wrote: > > So, how can I plug the WildcardFilter in, to prevent TooManyClauses? Are > there other ways, than using the trunk? > Now I ended up in overriding also QueryParser.getPrefixQuery() method, using ConstantScoreQuery and PrefixFilter. MaxClauseCountExc is gone, but

Re: IndexSearcher.search

2008-09-19 Thread Dino Korah
I really think Hits is definitely a nice utility class, when it comes to GUI results presentation. If we are to use our own class for this purpose, it wouldn't be much different from Hits. Its a shame that we are drooping it.! 2008/9/19 Daniel Noll <[EMAIL PROTECTED]> > Chris Hostetter wrote: > >

Re: lucene Front-end match

2008-09-19 Thread 叶双明
Thanks! Now, I just use Query query = qp.parse("a*"); and meet the my requirements. Another question: how to parser query string like: title:"The Right Way" AND text:go please show me in java code. thanks. 2008/9/19 Karl Wettin <[EMAIL PROTECTED]> > > 19 sep 2008 kl. 11.05 skrev 叶双明:

how use ranges for numeric values?

2008-09-19 Thread Giannandrea Castaldi
Hi, I need to specify in my query ranges with product price. I wonder if the only solution is padding values with zeros. For example, if I'm looking for price between 3$ and 10$ I must write the query in this manner: price:[3.00 TO 00010.00]? Thanks. G

Re: Background merge hit exception

2008-09-19 Thread Michael McCandless
vivek sar wrote: Thanks Mike for the insight. I did check the stdout log and found it was complaining of not having enough disk space. I thought we need only x2 of the index size. Our index size is 10G (max) and we had 45G left on that parition - should it still complain of the space? Is ther

Re: lucene Front-end match

2008-09-19 Thread Karl Wettin
19 sep 2008 kl. 11.05 skrev 叶双明: Document> Document> How can I get the first Document buy some query string like "a" , "ab" or "abc" but no "b" and "bc"? You would create an ngram filter that create grams from the first position only. Take a look at EdgeNGramTokenFilter in contrib/analy

Re: could I implement this scenario?

2008-09-19 Thread xh sun
Thank you for your suggestion.   - Original Message From: Dragan Jotanovic <[EMAIL PROTECTED]> To: java-user@lucene.apache.org Sent: Friday, September 19, 2008 4:58:34 PM Subject: RE: could I implement this scenario? I think it is not good idea to use lucene as storage, it is just index.

lucene Front-end match

2008-09-19 Thread 叶双明
Hi, all! How to implement Front-end match use lucene? Say, two Documents in index: Document> Document> How can I get the first Document buy some query string like "a" , "ab" or "abc" but no "b" and "bc"? Any input is appreciate! -- Sorry for my English!! 明 Please help me correct my English exp

RE: could I implement this scenario?

2008-09-19 Thread Dragan Jotanovic
I think it is not good idea to use lucene as storage, it is just index. You could probably implement this using flat files and lucene. Your simDocId would be stored field which you can retrieve from the index after search, and it could also contain the information where on the disk is document lo

Re: could I implement this scenario?

2008-09-19 Thread xh sun
I store the data in flatfiles and db. I want to implement it using Lucene only, but if it fails, maybe I shall create a temporary table for each query. - Original Message From: mathieu <[EMAIL PROTECTED]> To: java-user@lucene.apache.org Sent: Friday, September 19, 2008 4:34:13 PM Subj

Re: could I implement this scenario?

2008-09-19 Thread mathieu
Lucene is just an index. Where do you wont to store your data? in a db, flatfiles, document with an url, in lucene? M. On Fri, 19 Sep 2008 16:25:27 +0800 (CST), xh sun <[EMAIL PROTECTED]> wrote: > Thank you. Mathieu. > > But the hits don't include the document doc02  in my example, how to > dis

Re: could I implement this scenario?

2008-09-19 Thread xh sun
you are right. thank you. - Original Message From: Jimi Hullegård <[EMAIL PROTECTED]> To: "java-user@lucene.apache.org" Sent: Friday, September 19, 2008 4:20:58 PM Subject: RE: could I implement this scenario? I think he meant that he wants the search to automatically retrieve the rel

Re: could I implement this scenario?

2008-09-19 Thread xh sun
Thank you. Mathieu. But the hits don't include the document doc02  in my example, how to display  doc02?  I don't want to search by docid. Thanks. - Original Message From: mathieu <[EMAIL PROTECTED]> To: java-user@lucene.apache.org Sent: Friday, September 19, 2008 4:14:34 PM Subject:

RE: could I implement this scenario?

2008-09-19 Thread Jimi Hullegård
I think he meant that he wants the search to automatically retrieve the related documents, instead of the ones that was matched by the query. mogul | jimi hullegård | system developer | hudiksvallsgatan 4, 113 30 stockholm sweden | +46 8 506 66 172 | +46 765 27 19 55 | [EMAIL PROTECTED] | www.m

Re: could I implement this scenario?

2008-09-19 Thread mathieu
Yes. You can store data in lucene index and don't search on it : your simdocid. M. On Fri, 19 Sep 2008 16:00:20 +0800 (CST), xh sun <[EMAIL PROTECTED]> wrote: > Hi all, > > How can I implemented this scenario in lucene? > > suppose every document has three fields: docid, doctext and simdocid

could I implement this scenario?

2008-09-19 Thread xh sun
Hi all, How can I implemented this scenario in lucene? suppose every document has three fields: docid, doctext and simdocid. docid is the id of the document, doctext is the content of the document, dimdocid is the docid of a similar document with this document. example: docid  doctext

Re: IndexSearcher.search

2008-09-19 Thread Daniel Noll
Chris Hostetter wrote: But it don'treally see how it chagnes anything ... if your goal is to perform an operating on every result in a set, why are you using TopDocSCollector? why not write a HitCollector and perform your operation in the collect method? We're not using TopDocCollector rig