Re: why did I build index slower and slower ?

2013-05-13 Thread Toke Eskildsen
On Mon, 2013-05-13 at 05:05 +0200, wgggfiy wrote: > My situation is that There are 10,000,000 documents, and I Build index every > 5,000 documents. while *in every build*, I follow these steps: > IndexWriterConfig iwc = new IndexWriterConfig(Version.LUCENE_40, analyzer); >

Re: why did I build index slower and slower ?

2013-05-13 Thread wgggfiy
En, thanke you. I also found the question that I should make the writer a singleton. and the writer commited and closed every batch. That is,In every buildIndexWriterConfig iwc = new IndexWriterConfig(Version.LUCENE_40, analyzer);iwc.setOpenMode(IndexWriterConfig.OpenMode.CREATE_OR_APPEND);iwc.setR

Re: [PhraseQuery] Can "jakarta apache"~10 be searched by offset ?

2013-05-13 Thread wgggfiy
Jack, according to you, How can I implemt this requirement ?Could you give me a clue ? thank you very much.The regex query seemed not worked ? I got the field such asFieldType fieldType = new FieldType(); FieldInfo.IndexOptions indexOptions = FieldInfo.IndexOptions.DOCS

Sort field with MultiReader

2013-05-13 Thread Tamer Gür
Hi all, I am using MultiReader for my searches and each reader has different fields. For one of the Reader. i need to add sort option which will be used only that specific reader. is it possible to do this with MultiReader? Thanks for help Tamer

Find index version with an index reader

2013-05-13 Thread Ramprakash Ramamoorthy
Team, We have three indices by three different versions of lucene(2.3,3.6 and 4.1). Is there anyway I can identify which index belongs to which version somehow programatically? Thanks in advance. -- With Thanks and Regards, Ramprakash Ramamoorthy, India. +91 9626975420

Re: [PhraseQuery] Can "jakarta apache"~10 be searched by offset ?

2013-05-13 Thread Jack Krupansky
You'll have to be more explicit about the actual data and what didn't work. Try developing a simple, self-contained unit test with some simple strings as input that demonstrates the case that you say doesn't work. I mean, regular expressions and field analysis can both be quite tricky - even

Re: TermsEnum.docFreq() returns 0

2013-05-13 Thread Ravikumar Govindarajan
Indexing code below. Looks very simple. Is this correct? IndexWriterConfig conf = new IndexWriterConfig(Version.LUCENE_42, new StandardAnalyzer(Version.LUCENE_42)); conf.setOpenMode(OpenMode.CREATE_OR_APPEND); String indexPath = ""; Directory dir=FSDi

Re: TermsEnum.docFreq() returns 0

2013-05-13 Thread Michael McCandless
That code looks correct. But can you tie it all together into a runnable test case? Ie add in the terms enum, calling docFreq and getting 0 when it should be 1. Also, if you run CheckIndex on the index produced by the code below, how many terms/freqs/positions does it report? Mike McCandless h

Default Value for All Indexed Fields

2013-05-13 Thread srividhyau
We are using Lucene 3.0.3. Is there a way to set a default value to all fields being indexed in Lucene? Say, i want to set the default value as "NULL", indexed=NOT_ANALYZED, stored=false. This default value will be used, when a particular document does not have a value set for any field. -

Performance of NULL check *:* -category:[* TO *]

2013-05-13 Thread srividhyau
All - We have a necessity to check for attributes with null values. There are 2 options that we narrowed down to 1. Either we index null values with 'NULL' string and then check against the string. This has a drawback as Lucene does not have the capability of setting any default value. and e

RE: Performance of NULL check *:* -category:[* TO *]

2013-05-13 Thread Uwe Schindler
There is a Filter that can find documents *without* or *with any* value: FieldValueFilter http://lucene.apache.org/core/4_3_0/core/org/apache/lucene/search/FieldValueFilter.html You can create a query out of it: new ConstantScoreQuery(new FieldValueFilter("fieldname", true)) Uwe - Uwe Sch

RE: Default Value for All Indexed Fields

2013-05-13 Thread Uwe Schindler
You have to do it yourself. - Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: u...@thetaphi.de > -Original Message- > From: srividhyau [mailto:srividhya.umashan...@hp.com] > Sent: Monday, May 13, 2013 7:45 PM > To: java-user@lucene.apache.org > Subjec