Lucene Keywords not matching

Discussion in 'Java' started by the_kiddie98@yahoo.com, Apr 4, 2005.

  1. Guest

    Hi,
    I have indexed some information from a database using the dotNet
    port of Lucene. If I index a field as a keyword then Lucene does not
    pick it up when searching. If I index the field as text then Lucene
    finds it. Here is a sample of the code. If anyone can see why please
    e-mail me at . This is somewhat urgent.


    Indexer:
    Document doc = new Document();
    doc.Add (Field.Text ("director_name",
    dRow["director_name"].ToString­())); // Works
    doc.Add (Field.Keyword ("director_name",
    dRow["director_name"].ToString­())); // Does not work


    Searcher:
    Query qry = QueryParser.Parse ("director_name:Donovan", "", new
    StandardAnalyzer());
    m_hits = m_indexSearcher.Search (qry);


    I am using a StandardAnalyzer for both indexing and searching.


    Cheers,


    JD
    , Apr 4, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Son KwonNam

    Does Lucene have a sort feature?

    Son KwonNam, Jun 22, 2004, in forum: Java
    Replies:
    0
    Views:
    373
    Son KwonNam
    Jun 22, 2004
  2. Replies:
    0
    Views:
    2,004
  3. Ezee
    Replies:
    1
    Views:
    4,131
    Harald
    Jul 30, 2005
  4. Zouplaz

    Lucene : rebuilding the index

    Zouplaz, Oct 19, 2005, in forum: Java
    Replies:
    3
    Views:
    4,737
    Zouplaz
    Oct 23, 2005
  5. Marc Bissonnette

    Pattern matching : not matching problem

    Marc Bissonnette, Jan 8, 2004, in forum: Perl Misc
    Replies:
    9
    Views:
    220
    Marc Bissonnette
    Jan 13, 2004
Loading...

Share This Page