how to use lucene api (Search Engine Java)

Discussion in 'Java' started by Ezee, Jul 29, 2005.

  1. Ezee

    Ezee Guest

    can any body please suggest me how to use the lucene api for searching
    keywords (in Java).

    --
    Ezee
    Ezee, Jul 29, 2005
    #1
    1. Advertising

  2. Ezee

    Harald Guest

    "Ezee" <> writes:

    > can any body please suggest me how to use the lucene api for searching
    > keywords (in Java).



    private Analyzer analyzer = ....;
    private IndexSearcher search = ...;

    Query q = QueryParser.parse(queryString, "MostImportantField", analyzer);
    Hits h = is.search(q);

    For more details read http://lucene.apache.org/java/docs/api/index.html

    Cheers,
    Harald.


    --
    ---------------------+---------------------------------------------
    Harald Kirsch (@home)|
    Java Text Crunching: http://www.ebi.ac.uk/Rebholz-srv/whatizit/software
    Harald, Jul 30, 2005
    #2
    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. Philipp Lenssen
    Replies:
    0
    Views:
    1,530
    Philipp Lenssen
    Jun 27, 2003
  2. Sasha
    Replies:
    3
    Views:
    584
    Sasha
    May 22, 2007
  3. Replies:
    10
    Views:
    787
    Amit Jain
    Aug 20, 2007
  4. rhino1130
    Replies:
    0
    Views:
    360
    rhino1130
    Mar 12, 2008
  5. pandi
    Replies:
    5
    Views:
    449
    pandi
    Dec 14, 2009
Loading...

Share This Page