Results 1 to 2 of 2
  1. #1
    manjuns is offline Member
    Join Date
    Oct 2009
    Rep Power

    Default Help regarding choosing Indexing Stratergies

    In my Application currently I am indexing Object with One Field[ID] to Hold ID of the Object which is stored and attributes of Object into Another Field [Content] to hold attribute information seperated by space and this Field is tokenized. When I search for information related to the Object I get result as ID and using that ID I fetech the information from backend and I show it as search result.

    Now the requirement is for some user of the application who don't have access to attributes in Object and search on that attribute information, then Object should not be included in the result.

    The reason why I see is not possible is as I am not Storing each attribute as Field instead Instead I am indexing many small text fields, aggregate the text into a single "contents" field and index only that.

    So is there any better approach for Indexing? Please help me out.

    Code Snippet:

    Document doc = new Document(..);
    Field objField = new Field("ID", objId, Field..STORE.YES)
    String attrValue = "";
    for(Attribute att: allAttributes){
    attrValue += att.getValue() + " ";
    Field attField = new Field("content", attrValue, Field.STORE.NO, Field.Index.TOKENIZED)

    Attributes are shown to user based on their access.

  2. #2
    kzvi.kzvi.1 is offline Member
    Join Date
    Oct 2008
    Rep Power


    You can store all searchable fields seperately and all publicly accessible fields in the contents fields. This way you will have better control on search.

    Also check the Asynchronous Writing option just in case your index grows too large.
    Have fun....

Similar Threads

  1. Problems after re-indexing SQL server
    By ahartley in forum Lucene
    Replies: 1
    Last Post: 11-04-2009, 07:07 PM
  2. Choosing a degree concentration
    By xcallmejudasx in forum Jobs Discussion
    Replies: 11
    Last Post: 08-14-2009, 12:30 PM
  3. file indexing
    By vislawath.jawaharlal in forum Threads and Synchronization
    Replies: 0
    Last Post: 04-07-2009, 02:15 PM
  4. Lucene Re-Indexing
    By connect2srinath in forum Lucene
    Replies: 1
    Last Post: 05-11-2008, 06:35 PM
  5. Indexing starting with 1
    By ravian in forum New To Java
    Replies: 4
    Last Post: 01-04-2008, 01:03 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