Re: TermRangeQuery work not

2015-12-26 Thread Michael Wilkowski
You mixed lowerDate with upperDate. MW Sent from Mi phone On 25 Dec 2015 16:41, "kaog" wrote: > hi > I did the change of variable "ISBN, it was a mistake I did when I wrote in > the post. unfortunately still it does not work TermRangeQuery. :( > > > > -- > View this message in context: > http://

Re: TermRangeQuery work not

2015-12-25 Thread kaog
hi I did the change of variable "ISBN, it was a mistake I did when I wrote in the post. unfortunately still it does not work TermRangeQuery. :( -- View this message in context: http://lucene.472066.n3.nabble.com/TermRangeQuery-work-not-tp4246519p4247358.html Sent from the Lucene - Java Users ma

Re: TermRangeQuery work not

2015-12-21 Thread Uwe Schindler
Hi, Your addDoc method indexes wrong contents for the date field. It uses some field named ISBN. Uwe Am 22. Dezember 2015 00:19:10 MEZ, schrieb kaog : >Hi i am kevin from Chile and i am new whit Lucene, > >I have 5 documents. Each document has a field date but i would search >on >range date wh

Re: TermRangeQuery with Proximity

2015-12-09 Thread Henri Hein
Uwe, Thanks, that worked. SpanNearQuery even has the ordering flag, which I also needed. I'm not seeing a big performance slowdown on my quick little test index, but I'll try with a bigger one and see what kind of running times I'm looking at. Timothy: thanks for the pointer, we will probably n

RE: TermRangeQuery with Proximity

2015-12-08 Thread Allison, Timothy B.
ssage- From: Uwe Schindler [mailto:u...@thetaphi.de] Sent: Tuesday, December 08, 2015 9:08 AM To: java-user@lucene.apache.org Subject: RE: TermRangeQuery with Proximity You can create a generalization of PheaseQueries, called SpanNearQueries. Those can have any other SpanQuery inst

RE: TermRangeQuery with Proximity

2015-12-08 Thread Uwe Schindler
You can create a generalization of PheaseQueries, called SpanNearQueries. Those can have any other SpanQuery instances as childs, e.g. SpanTermQuery and SpanMultiTermQueryWrapper instances. As RangeQueries or Wildcards are internally subclasses of MultiTermQuery, you can use them wrapped in com

Re: TermRangeQuery performance oddness

2013-05-07 Thread Aleksey
Thank you for the detailed answer. I'll look into the FieldCacheRangeFilter. Is there another way of getting a page of results starting with some term that does not have similar issue? Basically I want to implement pagination of docs sorted by title, next page starting from last doc of the previous

RE: TermRangeQuery performance oddness

2013-05-07 Thread Uwe Schindler
Hi, The problem is by design: Lucene is an inverted index, so lookups can only be done by single terms and find the documents related to every single term. To execute a range, the query first have to position the terms enum on the first term and then iterate over all *terms* in the index (not d

Re: TermRangeQuery with multiple words

2012-08-20 Thread Jochen Hebbrecht
e, or as a wildcard or prefix query (e.g., >"Microsoft*"), or as a range query with the full literal string values. > >-- Jack Krupansky > >-Original Message- >From: Jochen Hebbrecht >Sent: Monday, August 20, 2012 9:13 AM >To: java-user@lucene.apache.org >Subject

Re: TermRangeQuery with multiple words

2012-08-20 Thread Jack Krupansky
the full literal string values. -- Jack Krupansky -Original Message- From: Jochen Hebbrecht Sent: Monday, August 20, 2012 9:13 AM To: java-user@lucene.apache.org Subject: Re: TermRangeQuery with multiple words Hi Ian, Thanks for your answer! Well, my example might have been not so clear. He

Re: TermRangeQuery with multiple words

2012-08-20 Thread Jochen Hebbrecht
Hehe Ian, our mails just crossed. I was thinking in the same way! :-). Thanks for your reply! 2012/8/20 Ian Lea > Jochen > > > No, I don't think that Lucene can make a String range query on > multiple terms. For your Microsoft example you could build a query > with Microsoft as required TermQue

Re: TermRangeQuery with multiple words

2012-08-20 Thread Jochen Hebbrecht
Hmm, just thinking. I could split the value on spaces. Then I can say: +TEST:Microsoft +TEST:[Belgium TO Spain] I just tested it, and it seems to work :-) ... 2012/8/20 Jochen Hebbrecht > Hi Ian, > > Thanks for your answer! > Well, my example might have been not so clear. Here's a better exam

Re: TermRangeQuery with multiple words

2012-08-20 Thread Ian Lea
Jochen No, I don't think that Lucene can make a String range query on multiple terms. For your Microsoft example you could build a query with Microsoft as required TermQuery and a required TermRangeQuery from Belgium to Spain but that would fall apart with multiword company or region names. It

Re: TermRangeQuery with multiple words

2012-08-20 Thread Jochen Hebbrecht
Hi Ian, Thanks for your answer! Well, my example might have been not so clear. Here's a better example: Doc 01: TEST: "Microsoft Belgium" Doc 02: TEST: "Apple" Doc 03: TEST: "Microsoft France" Doc 04: TEST: "Evian" Doc 05: TEST: "Nokia" Doc 06: TEST: "Novotel" Doc 07: TEST: "Microsoft Germany" Do

Re: TermRangeQuery with multiple words

2012-08-20 Thread Ian Lea
This won't work with TermRangeQuery because neither "test 1" not "test 3" are terms. "test" will be a term, output by the analyzer. You'll be able to see the indexed terms in Luke. Sounds very flaky anyway - you'd get "term 10 xxx" and "term 100 xxx" as well as "term 1" and "term 2". If your TE

Re: TermRangeQuery

2010-11-28 Thread Erick Erickson
OK, maybe I'm catching on at last. Have you considered just skipping the whole search thing entirely? Something like using one of the classes implementing TermDocs to get the document for a particular term (one of the elements of your list of dataIds in this case). That would give you the doc numbe

Re: TermRangeQuery

2010-11-28 Thread Amin Mohammed-Coleman
Hi I'll explain my use case more and then explain the out come of my implementation: I have lucene documents that look like this: Field name Field Value dataId TYX-CC-124 categoryCATEGORY A What I would like to do is for a given collection of dat

Re: TermRangeQuery

2010-11-28 Thread Erick Erickson
Why won't Ian's suggestion work? You haven't really given us a clue what it is about your attempt that didn't work. The expected and actual output would be useful... But Ian's notion is the well-known issue that lexical and numeric sorting aren't at all the same. You'd get reasonable results if yo

Re: TermRangeQuery

2010-11-26 Thread Amin Mohammed-Coleman
Essentially I'd like to construct a query which is almost like SQL in clause. The lucene document contains the id and a string value. I'd like to get the string value based on the id key. The ids may range within 1000. Is this possible to do? Thanks Amin Sent from my iPhone On 26 Nov 2010,

Re: TermRangeQuery

2010-11-26 Thread Ian Lea
What sort of ranges are you trying to use? Maybe you could store a separate field, just for these queries, with some normalized form of the ids, with all numbers padded out to the same length etc. -- Ian. On Fri, Nov 26, 2010 at 4:34 PM, Amin Mohammed-Coleman wrote: > Hi > > Unfortunately my ra

Re: TermRangeQuery

2010-11-26 Thread Amin Mohammed-Coleman
Hi Unfortunately my range query approach did not work. It seems to be related to the ids themselves. The list has ids that look this: ID-NYC-1234 ID-LND-1234 TX-NYC-1334 TX-NYC-BBC-123 The ids may range from 90 to 1000. Is there another approach I could take? I tried building a string wi

Re: TermRangeQuery

2010-11-26 Thread Amin Mohammed-Coleman
Hi Basically test my ids look like: AAA-231 AAD-234 ADD-123 Didn't now about the collator, i was going to do a custom sort based on the number part of the id. Thanks Amin On 26 Nov 2010, at 14:39, Ian Lea wrote: > Absolutely, as long as your ids will sort as you expect. > > I'm not clear w

Re: TermRangeQuery

2010-11-26 Thread Ian Lea
Absolutely, as long as your ids will sort as you expect. I'm not clear what you mean by XDF-123 but if you've got AAA-123 AAA-124 ... ABC-123 ABC-234 etc. then you'll be fine. If they don't sort so neatly you can use the TermRangeQuery constructor that takes a Collator but note the performance