Results 1 to 2 of 2
  1. #1
    Mayank15 is offline Member
    Join Date
    Jun 2010
    Posts
    1
    Rep Power
    0

    Default Maximum Length of A field in Lucene

    Is there a limit on any field's length in a document in lucene? I have a field of length 400196 (thats large as it basically appends many fields, and I don't want to be using MultiField Queries)... Now, if I search giving any text that is present in the later parts of the field, it never shows up in the results. On opening the index with Luke, and using the "Reconstruct and Edit" feature, the Tokenized tab from the particular field only shows the content from the first 10000 characters or so. Any suggestions?

  2. #2
    peliukasss is offline Member
    Join Date
    Feb 2010
    Posts
    21
    Rep Power
    0

    Default

    You have to set field's length by doing this:
    IndexWriter iwriter = new IndexWriter(directory, analyzer, true, IndexWriter.MaxFieldLength.UNLIMITED);

    Hope this helps.

Similar Threads

  1. find maximum value from for loop
    By napi1234 in forum New To Java
    Replies: 15
    Last Post: 06-02-2010, 03:39 PM
  2. Maximum length of Command Line Argument
    By balamurugan.murthy in forum Advanced Java
    Replies: 11
    Last Post: 05-21-2010, 04:45 PM
  3. Calculating Maximum and Minimum
    By Ejava in forum New To Java
    Replies: 6
    Last Post: 03-01-2010, 04:36 PM
  4. Replies: 4
    Last Post: 01-17-2010, 11:13 PM
  5. get the average and maximum score
    By Eric in forum Advanced Java
    Replies: 2
    Last Post: 07-01-2007, 04:15 AM

Tags for this Thread

Posting Permissions

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