Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 72187 invoked from network); 24 May 2007 11:07:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 May 2007 11:07:26 -0000 Received: (qmail 36510 invoked by uid 500); 24 May 2007 11:07:23 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 36395 invoked by uid 500); 24 May 2007 11:07:22 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 36350 invoked by uid 99); 24 May 2007 11:07:22 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 May 2007 04:07:22 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [208.97.132.83] (HELO spunkymail-a9.g.dreamhost.com) (208.97.132.83) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 May 2007 04:07:11 -0700 Received: from [192.168.0.2] (adsl-074-229-189-244.sip.rmo.bellsouth.net [74.229.189.244]) by spunkymail-a9.g.dreamhost.com (Postfix) with ESMTP id 500BC20F1A for ; Thu, 24 May 2007 04:06:09 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v752.2) In-Reply-To: References: Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <8F166426-E9E6-4E08-A4A3-6BE74713069E@apache.org> Content-Transfer-Encoding: 7bit From: Grant Ingersoll Subject: Re: WITH_POSITIONS_OFFSETS versus WITH_OFFSETS Date: Thu, 24 May 2007 07:05:48 -0400 To: java-user@lucene.apache.org X-Mailer: Apple Mail (2.752.2) X-Virus-Checked: Checked by ClamAV on apache.org WITH_OFFSETS gives the equivalent of Token.startOffset and Token.endOffset information which is the actual offset in the String (although it can be manipulated), while WITH_POSITIONS gives the position information (which can also be manipulated). Position info tells where the token occurs relative to the other tokens, i.e. what order they occur in. Using WITH_POSITIONS is in line with getTermPositions(). The practical use of using WITH_P_O is when you need both positions and offsets, I guess. Maybe in highlighting or some advanced analysis cases. HTH -Grant On May 24, 2007, at 12:03 AM, Michael Mitiaguin wrote: > What practical of using WITH_POSITIONS_OFFSETS ? Aren't WITH_OFFSETS > sufficient and if iterate getStartOffset effectively gives the value > from array element of getTermPositions ? > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-user-help@lucene.apache.org > -------------------------- Grant Ingersoll Center for Natural Language Processing http://www.cnlp.org/tech/lucene.asp Read the Lucene Java FAQ at http://wiki.apache.org/jakarta-lucene/ LuceneFAQ --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org