Hi Jack,
Thanks, your solution could work too, but I prefer Ian his solution. I
only have to index the data once, and the solution takes place in an easy
place in the business logic.
But perhaps, somebody else with this problem could use your solution.
Happy that you've posted this solution as wel
You could index the values in both a "text" and a separate "string" field.
Then you can query the text field by keyword as well as the string field by
the full literal value, or as a wildcard or prefix query (e.g.,
"Microsoft*"), or as a range query with the full literal string values.
-- Jack
No. See the FAQ.
http://wiki.apache.org/lucene-java/LuceneFAQ#How_do_I_update_a_document_or_a_set_of_documents_that_are_already_indexed.3F
There are a couple of ideas floating around e.g.
http://www.flax.co.uk/blog/2012/06/22/updating-individual-fields-in-lucene-with-a-redis-backed-codec/
or http
Hi there,
Is it possible to update a document in the lucene index with an
additional field?
I have a massive index and would like to add a numeric field with a date
in number format into each document.
This is to perform searches with NumericRangeFilters using the dates as
numbers when search
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
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
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
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
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
org.apache.lucene.index.PKIndexSplitter in contrib-misc sounds promising.
www.slideshare.net/abial/eurocon2010 "Munching & crunching - Lucene
index post-processing" sounds well worth a look too.
Or just build new indexes from scratch routing docs to the correct
index however you choose.
--
Ian
Hi there,
I currently have a lucene index based on version 3.5 made up of xml
documents.
I'd like to create smaller indexes from the main index ;
1) an index based on a date range from the last week
2) an index based on the last month
3) an index based on the last 3 months.
The reason I would
Hi
You need to use prefix query for your requirement. Below are my thoughts
and hope it helps.
Say "Hello World" is your phrase.
1. Do a phrase query with your phrase ("Hello World")
2. If not found then strip the last character and then do prefix query
("Hello Worl")
3. Continue step 2 still yo
12 matches
Mail list logo