Results 1 to 2 of 2
  1. #1
    gfreeman is offline Member
    Join Date
    Jul 2012
    Posts
    1
    Rep Power
    0

    Default Combine exact Match and wildcard query

    Hello there,

    I want to limit the access to the data, which can be found within my lucene index. I have two fields which I have filled with parameters for access restriction on the element.
    Searching the elements in the index is a standard Lucene search with a StandardAnalyzer as parameter for my queryparser.
    But I want to include the exact match on the restriction fields ?!?!

    But I can only choose one Analyzer for the Queryparser... for exact matches I will need the KeywordAnalyzer.

    !?! Anybody has the same problems or some ideas bout this?

    thanks for help

    gordon

  2. #2
    coolman is offline Member
    Join Date
    Jul 2012
    Posts
    2
    Rep Power
    0

    Default Re: Combine exact Match and wildcard query

    Hi,

    I think all what you need to do is to specify that this restriction field is not analyzed.

    doc.Add(new Lucene.Net.Documents.Field("author", "me", Field.Store.YES, Field.Index.NOT_ANALYZED, Field.TermVector.WITH_POSITIONS_OFFSETS));

Similar Threads

  1. open file with wildcard?
    By minotaurus in forum New To Java
    Replies: 1
    Last Post: 03-01-2011, 09:15 AM
  2. Pbm in Generic WildCard?
    By makpandian in forum New To Java
    Replies: 1
    Last Post: 02-07-2011, 08:07 PM
  3. Highlighting with exact match
    By ashkandaie in forum Lucene
    Replies: 3
    Last Post: 09-09-2010, 06:36 AM
  4. How to display WildCard search values
    By peliukasss in forum Lucene
    Replies: 1
    Last Post: 08-25-2010, 02:29 PM
  5. Query search for exact word
    By peliukasss in forum Lucene
    Replies: 2
    Last Post: 08-16-2010, 08:08 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •