Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How QtClucene work?
Forum Updated to NodeBB v4.3 + New Features

How QtClucene work?

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 7.8k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Z Offline
    Z Offline
    zither
    wrote on last edited by
    #1

    Dear all,

    I would like to know this library file QtClucene & how it works.

    Is it related with lucence search like in java?

    How can I implement this library?

    Thanks

    1 Reply Last reply
    0
    • G Offline
      G Offline
      goetz
      wrote on last edited by
      #2

      Qt uses clucene for searching in the help documents. As far as I know clucene is a C port of the Java lucene. Unfortunately there is no documentation around, but you may want to have a look at the documentation and help modules' sources in the Qt source tree.

      http://www.catb.org/~esr/faqs/smart-questions.html

      1 Reply Last reply
      0
      • P Offline
        P Offline
        privet
        wrote on last edited by
        #3

        There is no Qt-like interface for using QtLucene (=CLucene) in your app.
        What a pity!!!

        You have to compile+link the sources in your app and use CLucene API, like:

        int iFlags = lucene::document::Field::STORE_YES | lucene::document::Field::INDEX_TOKENIZED;
        lucene::document::Document doc;
        doc.add(*(_CLNEW lucene::document::Field(tFieldName, tFieldVal, iFlags)));
        writer.addDocument(&doc);

        search:
        lucene::analysis::WhitespaceAnalyzer analyzer;
        m_pQuery = lucene::queryParser::QueryParser::parse(a,_T("text"),&analyzer);
        lucene::search::IndexSearcher searcher(sDirOfIndex);
        m_pHits = searcher.search(m_pQuery);

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved