Here's the code which I am implementing (Indexing and Searching codes are in
different files)
Indexing Part :
d=new Document();
File indexDir = new File("index-dir");
KeywordAnalyzer analyzer = new KeywordAnalyzer();
IndexWriterConfig conf = new IndexWriterConfig
ache.lucene.search.regex.RegexQuery.
>
>
>
> --
> Ian.
>
>
> On Wed, Jun 22, 2011 at 9:16 AM, Pranav goyal
> wrote:
> > I can always use * , ?
> >
> > But here I am not talking of this. I just want to get everything which
> has
> > 341 in it. How t
I can always use * , ?
But here I am not talking of this. I just want to get everything which has
341 in it. How to do it without * or ?
On Wed, Jun 22, 2011 at 1:00 PM, Pranav goyal wrote:
> Hi all,
>
> I am in a fix regarding lucene search. I know a little bit about lucene a
Hi all,
I am in a fix regarding lucene search. I know a little bit about lucene and
have successfully created index and searched a lot of queries on that.
My main worry is that whenever I search for let say "000" it doesn't give me
any result while if I seach for "0341" it'll give me a hit. Ev
Hi Danny,
I have explained it above.
It has many fields out of which DocId is the field which I am storing as
well as indexing. While other fields I am just storing.
And Each document has unique DocId.
d=new Document();
File indexDir = new File("./index-dir");
StandardAnalyzer analyzer = new Sta
When I am using a deleteAll() instead of deleteDocuments();
it's working fine.
What can be the problem. Still not able to figure it out.
On Fri, Jun 10, 2011 at 3:50 PM, Pranav goyal wrote:
> Hi Ian,
>
> Thanks for your reply. But even this isn't working.
> My document
he difference between that and what you have.
>
> You don't need to call optimize() all the time, it at all.
>
>
> --
> Ian.
>
>
> On Fri, Jun 10, 2011 at 9:24 AM, Pranav goyal
> wrote:
> > Hi,
> >
> > I tried 3-4 ways to delete
Hi,
I tried 3-4 ways to delete a document but still no results. I am using
Lucene 3.1
I used writer.UpdateDocuments(Term term, Document d)
as well as write.addDocument(d); and after that writer.deleteDocuments(d);
Using both I am not able to delete the previous document.
Is there any problem in
Hi,
I want to retrieve all the field names from my index so that I can store
them in an array to use in MutiFieldQueryParser.
One question can I do it using my index directory? If yes then a piece of
code would be really helpful as I searched out a lot but no documentation is
there on this thing.
k you put there is actually there. When you added data to your
> index, did you
> perform a commit?
>
> Best
> Erick
>
> On Wed, Jun 8, 2011 at 2:45 AM, Pranav goyal
> wrote:
> > There is one field DocId which I am storing as well as indexing and DocId
> > and
Oh sry,
I got my error and it worked.
Thanks
On Wed, Jun 8, 2011 at 3:57 PM, Pranav goyal wrote:
> import java.io.File;
> import java.io.IOException;
> import java.util.Collection;
> import java.util.Iterator;
> import java.util.List;
> import java.ut
import java.io.File;
import java.io.IOException;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.standard.StandardAnalyzer;
import org.apache.lucene.document.Document;
tackTrace();
} catch (IOException e) {
e.printStackTrace();
}
System.out.printf("%5.3f %sn", hit.score,
doc.get("DocId"));
}
On Wed, Jun 8, 2011 at 11:47 AM, Pranav goyal wrote:
> Thanks Anshum
>
y Lucene works/is used.
>
> --
> Anshum Gupta
> http://ai-cafe.blogspot.com
>
>
> On Wed, Jun 8, 2011 at 11:00 AM, Pranav goyal >wrote:
>
> > Hi all,
> >
> > I am getting confused in this thing,
> >
> > Let say I make a lucene index using a doc
Hi all,
I am getting confused in this thing,
Let say I make a lucene index using a document having a key field (which I
am storing as well as indexing)
and rest of my fields I am just indexing.
When I make some query what would be my result?
Will it be the field which I am storing or it can be a
Hi all,
Got stuck at a place and not able to think what should I do.
I have one structure which I have to index. Let say the structure name is
Contract which has a unique Contract_ID. Let say I have 50 contracts which I
have to index.
Now each contract has let say 100 different keys with their va
> http://ai-cafe.blogspot.com
>
>
> On Mon, Jun 6, 2011 at 11:59 AM, Pranav goyal >wrote:
>
> > Hi all,
> >
> > I am a newbie to lucene.
> > I have successfully created my lucene index. But I am not getting how to
> > invalidate previous indexes wh
Hi all,
Is there any way to change my lucene document no?
Like if I can change my lucene document no's with con_key.
I am a newbie and don't know whether this is a silly question or not.
Please reply.
Thanks
Hi all,
I am a newbie to lucene.
I have successfully created my lucene index. But I am not getting how to
invalidate previous indexes whenever I add/delete/update any field in my
lucene index.
Please help me out.
for better understanding I have wrote my indexing function :
StandardAnalyzer analy
19 matches
Mail list logo