how to do simple search paging results of 100 each? and query syntax question

2011-06-19 Thread Hiller, Dean x66079
On the link http://lucene.apache.org/java/3_0_3/queryparsersyntax.html#Range%20Searches There is ranged searched, how do I specify everything above a date from date 20020101 to end of time? Next, I am temporarily using lucene in a noSQL solution(to switch to Solr later after prototype) and

looks like no allowing of paging without counting entire result set?

2011-06-19 Thread Hiller, Dean x66079
performant. Should I just use 2.9 instead? But then 3.x doesn't seem to support this? Thanks, Dean From: Hiller, Dean x66079 Sent: Sunday, June 19, 2011 11:29 AM To: 'java-user@lucene.apache.org' Subject: how to do simple search paging results of 100 each? and query syntax questi

RE: looks like no allowing of paging without counting entire result set?

2011-06-19 Thread Hiller, Dean x66079
"It supports it like 2.9, but not using the Hits API. As described above, to show results 991 to 1000 request the top-1000 results and display the last 10 :-)" Bear with me as I am little confused so let me throw some stuff down here and think out loud... So, I basically have to request the top 1

basic example of lucene not working(must be user error, but I am just missing it)

2011-06-19 Thread Hiller, Dean x66079
I have a JUnit test case so I can demonstrate Lucene to myself. It correctly returns a hit count of 2 but then when I get the docs, there is only ONE, and I can't seem to get the info on the 2nd hit at all. Notice my logs print 2 and 1 if you run this example on the counts... getTotalHits = 2

RE: how to do simple search paging results of 100 each? and query syntax question

2011-06-19 Thread Hiller, Dean x66079
@lucene.apache.org Subject: Re: how to do simple search paging results of 100 each? and query syntax question On Sun, Jun 19, 2011 at 7:29 PM, Hiller, Dean x66079 wrote: > On the link > http://lucene.apache.org/java/3_0_3/queryparsersyntax.html#Range%20Searches > > > There is range

RE: how to do simple search paging results of 100 each? and query syntax question

2011-06-19 Thread Hiller, Dean x66079
yet. I am sure people well just as ScrollableResultSet was eventually added into hibernate. Thanks, Dean -Original Message- From: Simon Willnauer [mailto:simon.willna...@googlemail.com] Sent: Sunday, June 19, 2011 1:48 PM To: Hiller, Dean x66079 Cc: java-user@lucene.apache.org Subject

ranged query didn't work, got exception...

2011-06-19 Thread Hiller, Dean x66079
11:48 AM To: java-user@lucene.apache.org Subject: Re: how to do simple search paging results of 100 each? and query syntax question On Sun, Jun 19, 2011 at 7:29 PM, Hiller, Dean x66079 wrote: > On the link > http://lucene.apache.org/java/3_0_3/queryparsersyntax.html#Range%20Searches >

RE: ranged query didn't work, got exception...

2011-06-19 Thread Hiller, Dean x66079
title, Field.Store.NO, Field.Index.NOT_ANALYZED)); document.add(new Field("date", dateTxt, Field.Store.NO, Field.Index.NOT_ANALYZED)); log.info("created doc=" + dateTxt + " entry+" + url); document.add(new Field("url", url,

RE: ranged query didn't work

2011-06-19 Thread Hiller, Dean x66079
se of that. Any ideas? Thanks, Dean -Original Message- From: Hiller, Dean x66079 Sent: Sunday, June 19, 2011 4:37 PM To: java-user@lucene.apache.org Subject: RE: ranged query didn't work, got exception... Swt, * worked, but SHUCKS.query completely returns no results. I don

RE: ranged query didn't work

2011-06-19 Thread Hiller, Dean x66079
: Sunday, June 19, 2011 7:00 PM To: java-user@lucene.apache.org Subject: Re: ranged query didn't work On 6/19/2011 8:11 PM, Hiller, Dean x66079 wrote: > Oddly, enough, this seems to work and I get one result calling > Collector.collect(int docIt)...(I found out AND has to be caps)... >

RE: looks like no allowing of paging without counting entire result set?

2011-06-20 Thread Hiller, Dean x66079
ich may be appropriate to your problem... Best Erick On Sun, Jun 19, 2011 at 2:39 PM, Hiller, Dean x66079 wrote: > "It supports it like 2.9, but not using the Hits API. As described above, to > show results 991 to 1000 request the top-1000 results and display the last > 10 :-)" &

RE: looks like no allowing of paging without counting entire result set?

2011-06-20 Thread Hiller, Dean x66079
at collected as many documents as you ever want to return and then you can use that list to "page". But that requires a stateful connection, which may be appropriate to your problem... Best Erick On Sun, Jun 19, 2011 at 2:39 PM, Hiller, Dean x66079 wrote: > "It supports it li

any documentation on creating a query without query language

2011-06-20 Thread Hiller, Dean x66079
I would like to skip creating the query using the query language. Our queries are simple and fixed Like account = :account and strategy=:strategy and date > :date So I would prefer maybe not to use a parser in the future sometime and am really just wondering how. For now, I am just going to us

anyway to store value as bytes?

2011-06-20 Thread Hiller, Dean x66079
I see the api in Lucene is new Field(String, String, Store, Index) Is there anyway to store one of the fields as byte[]? Specifically the value I am looking up I would like it to be byte[] instead of String. All my other ones are String anyways. Thanks, Dean This message and any attachments

how to do something like sql in () clause

2011-06-20 Thread Hiller, Dean x66079
I need to do something like a lucene query with Where accountId in ( 1, 2, 3, 4) Is there a way to do that in Lucene Query language? Thanks, Dean This message and any attachments are intended only for the use of the addressee and may contain information that is privileged and confidential. If

RE: any documentation on creating a query without query language

2011-06-20 Thread Hiller, Dean x66079
myAccount)), Occur.MUST); bq.add(new TermRangeQuery("date", minDate, maxDate, false, false), Occur.MUST); and so on. Bye *Raf* On Mon, Jun 20, 2011 at 5:54 PM, Hiller, Dean x66079 < dean.hil...@broadridge.com> wrote: > I would like to skip creating the query using the query l

RE: how to do something like sql in () clause

2011-06-20 Thread Hiller, Dean x66079
to do something like sql in () clause You could use BooleanQuery with Occur.SHOULD quantificator http://lucene.apache.org/java/3_0_3/api/core/org/apache/lucene/search/BooleanClause.Occur.html#SHOULD On Jun 21, 2011, at 9:24 AM, Hiller, Dean x66079 wrote: > I need to do something like a luc

RE: how to do something like sql in () clause

2011-06-20 Thread Hiller, Dean x66079
d(new TermQuery(new Term("accountId", "3")), Occur.SHOULD); On Jun 21, 2011, at 11:01 AM, Hiller, Dean x66079 wrote: > But the issue is that it MUST be 1, OR MUST be 2 so does that still work? > > Also, how do you write that in the query syntax? > > Thanks, > Dean &

why is query picking up extra result

2011-06-21 Thread Hiller, Dean x66079
Because when I use [ 20110601 TO * ] lucene does not return my results greater than 20110601 but when I use [20110601 TO ], it works fine. Why is this? How do I get everything larger than 20110601. I have another Case of sequence numbers and want to get everything above a certain numbe

RE: question about wildcards

2011-06-21 Thread Hiller, Dean x66079
I wonder if you would be better off creating a second index with the words reversed.depends on your application profile I guess and what you want, but an additional index may not be too bad in some cases to speed up the search. Dean -Original Message- From: G.Long [mailto:jde...@gma

RE: anyway to store value as bytes?

2011-06-21 Thread Hiller, Dean x66079
gs to mind. ** Best Erick On Mon, Jun 20, 2011 at 2:26 PM, Hiller, Dean x66079 wrote: > I see the api in Lucene is new Field(String, String, Store, Index) > > Is there anyway to store one of the fields as byte[]?  Specifically the value > I am looking up I would like it to be by

I have seen this exception on some posts around but don't see the cause/solution(RamDirectory)..

2011-06-21 Thread Hiller, Dean x66079
Anyone know how to do a simple RamDirectory...I just created it but it is failing with this... Caused by: org.apache.lucene.index.IndexNotFoundException: no segments* file found in org.apache.lucene.store.RAMDirectory@1d5a7f6 lockFactory=org.apache.lucene.store.SingleInstanceLockFactory@64804:

any optimizations I can make on this code

2011-06-21 Thread Hiller, Dean x66079
I am running over a 100 million row nosql set and unfortunately building 1 million indexes. Each row I get may or may not be for the index I just wrote too so I can't keep IndexWriter open very long. I am currently simulating how long it would take me to build all the indexes and it looks like

IndexWriter.optimize not using it breaks my test case :(

2011-06-22 Thread Hiller, Dean x66079
I read that in a lot of cases IndexWriter.optimize does not have to be called. I then deleted it and my junit test case broke because results were coming back in the query that were not supposed to be coming back :(. I think everything is single tested. Maybe I should write a more raw junit te

RE: I have seen this exception on some posts around but don't see the cause/solution(RamDirectory)..

2011-06-22 Thread Hiller, Dean x66079
s you are trying to open a searcher on a RAMDirectory that doesn't yet contain anything. Files only get written when stuff is added to an index and the writer is closed or committed. -- Ian. On Tue, Jun 21, 2011 at 11:43 PM, Hiller, Dean x66079 wrote: > Anyone know how to do a simple Ram

Too many open files and ulimit limits reached

2011-06-30 Thread Hiller, Dean x66079
When I do a writer.open(), writer.add(), writer.close(), how many files can I expect to be opened with Lucene. I am running indexes on some very big data so we have 16 writers open and I hit the limit of 20 on my machine so I increased it to the max of 1048576 files open, BUT that might

deleting 8,000,000 indexes takes forever!!!! any solution to this...

2011-07-05 Thread Hiller, Dean x66079
We are using a sort of nosql environment and deleting 200 gig on one machine from the database is fast, but then we go and delete 5 gigs of indexes that were created and it takes forever Is there any option in lucene to make it so it uses LARGER files and less count of files so it is easier