Right, the value in a Field cannot be null.
Mike
Jay wrote:
You are right, Lucene only gives IllegalArgumentException when the
value is null. I assume it won't skip the field is the value is
empty or null?
Thanks!
Jay
Michael McCandless wrote:
As far as I know, Lucene should accept a f
1) I should be calling release of writer and searcher after every call. Is
it always mandatory in cases like searcher, when I am sure that I havn't
written anything since the last search ?
You have to be careful here. It works like this: a single searcher is
cached and returned every time. O
Thanks Mark!
Option D looks great. Regarding that option, I have couple of questions
based on my first glance at the code ( more specifically SimpleSearchServer
)
1) I should be calling release of writer and searcher after every call. Is
it always mandatory in cases like searcher, when I am sure
You are right, Lucene only gives IllegalArgumentException when the value
is null. I assume it won't skip the field is the value is empty or null?
Thanks!
Jay
Michael McCandless wrote:
As far as I know, Lucene should accept a field with an empty string
value -- how did you hit the IllegalArg
You are not seeing the doc because you need to close the IndexWriter first.
To have an interactive index you can:
A: roll your own.
B: use Solr.
C: use the original LuceneIndexAccessor
https://issues.apache.org/jira/browse/LUCENE-390
D: use my updated IndexAccessor
https://issues.apache.org/ji
Hi All,
A newbie out here I am using lucene 2.3.0. I need to use lucene to
perform live searching and indexing. To achieve that, I tried the following
FSDirectory directory = FSDirectory.getDirectory(location);
IndexReader reader = IndexReader.open(directory );
IndexWriter writer = new Index
As far as I know, Lucene should accept a field with an empty string
value -- how did you hit the IllegalArgumentException?
Mike
Jay wrote:
Thanks, Michael, for your quick reply and explanation.
One related question: is it true that Lucene indexer will reject a
field that has the empty s
Woops, you are correct, the file formats doc is out of date.
It should be #1.
I'll fix it -- thank you for raising it!
Mike
Ivan Vasilev wrote:
Hi Guys,
In the File Formats web page (http://lucene.apache.org/java/2_3_0/
fileformats.html) there is section describing Segments File, where
Hi Guys,
In the File Formats web page
(http://lucene.apache.org/java/2_3_0/fileformats.html) there is section
describing Segments File, where we read:
Segments --> Format, Version, NameCounter, ...
...
Format is -1 as of Lucene 1.4 and -3
(SemgentInfos.FORMAT_SINGLE_NORM_FILE) as of Lucene 2
Thanks, Michael, for your quick reply and explanation.
One related question: is it true that Lucene indexer will reject a field
that has the empty string value? (I saw an IllegalArgumentException).
Will be nice if lucene just skip such a field silently, esp, for the new
2.3 api.
Jay
Michael M
Hi Grant,
I have an index for articles containing fields 'id' , 'body' and others
BooleanQuery query = new BooleanQuery;
queryParser = new QueryParser("body", new StandardAnalyzer());
query.add(queryParser.parse("keywords"), Occur.MUST);
if i query at this level then i get all the articles I
Hi Prabin,
Can you give an example of what you would like a query to look like?
Lucene doesn't do negative boosts (ok, w/ a patch, I think it can,
but...) At any rate, the boosts are relative, so perhaps you just
lower the boost to be very small for the "bad" terms and raise it
higher f
Thank you, this was exactly what I needed. So "tokenizing" really
denotes a more general process that can involve normalizing the case or
whatever else can be done with a filter. This is where I was confused.
Eleanor
Jan Peter Stotz wrote:
Hi Eleanor.
In my Lucene index there's a field tha
I need know document's top n raw score & term.
For example,
If one document have {apple, banana, coconut} terms, and I need top 2 score
in the document.
Simple way is just search all term in the document and sort the score - like
as below.
first, search about 'apple' term then write the score
On Feb 1, 2008 9:47 AM, Mark Miller <[EMAIL PROTECTED]> wrote:
>
> Cedric Ho wrote:
> >
> > But managing such a set of indexes is not trivial. Especially when
> > need to add redundancies for reliability and update frequently.
> >
> Agreed. Apparently the Solr guys are working on this now. Certainl
yu wrote:
Hi,
I am trying to use the latest 2.3 API on Field to improve the
indexing performance by reusing Documents and Fields. After
reading lucene-java wiki and the java doc on Field, I have a couple
of questions about the comment in Field.setValue(), namely,
"Note that you should
John Wang wrote:
Thanks Chris! This works with lucene2.1 and greater (breaks with
lucene2.0)
A follow up question, anyway to rename and to delete a field.
Rename field: I tried to use a hex editor to edit the .fnm file
(screwed up
my index, but I was careful and followed the index format
Woops -- disregard this! Chris' approach will work. And, we don't
need addParallelIndices!
Mike
Michael McCandless wrote:
I don't think this will do the right thing in this case, because
addIndexes "appends" the documents from all indices together.
Whereas John wants to "merge in" a
I don't think this will do the right thing in this case, because
addIndexes "appends" the documents from all indices together.
Whereas John wants to "merge in" a new field into all docs in an
existing index.
Really what we need is a new "addParallellIndices" method. I think,
conceptual
Hi Eleanor.
In my Lucene index there's a field that contains the local names of XML
elements, one name per document. Users can enter arbitrary queries for
this field, so I'm using a QueryParser.
From reading around it looks as if the field needs to be tokenized, but
since the field's conten
Thanks Chris! This works with lucene2.1 and greater (breaks with lucene2.0)
A follow up question, anyway to rename and to delete a field.
Rename field: I tried to use a hex editor to edit the .fnm file (screwed up
my index, but I was careful and followed the index format)
Deleting a field: ideas?
21 matches
Mail list logo