Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 36345 invoked from network); 5 Oct 2005 16:55:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 5 Oct 2005 16:55:20 -0000 Received: (qmail 45366 invoked by uid 500); 5 Oct 2005 12:51:19 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 45322 invoked by uid 500); 5 Oct 2005 12:51:18 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 45295 invoked by uid 99); 5 Oct 2005 12:51:18 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Oct 2005 05:51:18 -0700 X-ASF-Spam-Status: No, hits=3.1 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_POST,HTML_20_30,HTML_IMAGE_ONLY_20,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [202.43.219.80] (HELO web8605.mail.in.yahoo.com) (202.43.219.80) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 05 Oct 2005 05:51:20 -0700 Received: (qmail 14928 invoked by uid 60001); 5 Oct 2005 12:50:51 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.in; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=FSz3VLFyKG2a6vYMp4PiDSajhjvu7XkFxGIaYuc15VQh6T7m5sDy9xnXcjSczDm3odsoyN9eYqQON8nEZLLUfNmeTlECjN7Y5270ow1kQeRuOpCPWMftfOpZJzdC7aoDJ1u7O0OcSd7BSaqih5tNNcmmy2hg9P3ONiK8OwjkNwk= ; Message-ID: <20051005125051.14925.qmail@web8605.mail.in.yahoo.com> Received: from [61.95.203.157] by web8605.mail.in.yahoo.com via HTTP; Wed, 05 Oct 2005 13:50:51 BST Date: Wed, 5 Oct 2005 13:50:51 +0100 (BST) From: shadab khan Subject: Re: finding the position of a term in a field..... To: java-dev@lucene.apache.org In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-791694259-1128516651=:14432" Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --0-791694259-1128516651=:14432 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit thnks erik thnks for your reply... with regards, Erik Hatcher wrote: On Oct 5, 2005, at 4:17 AM, shadab khan wrote: > hi all, > while indexing for a document, one field i am using is "contents". > > doc.add(Field.Text("contents", reader)); > > the "contents" field is not being stored in index(only being > tokenize and indexing. Now my problem is to find the position for a > word from this field(i.e. contents). if you have a solution for > this plzz send it to me asap. One solution is to store it. :) Field.Text(String,Reader) does not store though, only Field.Text(String,String). So you will need to load it as a String first to do that. An alternative is to grab the contents from its original location when you need the positions and re-run the Analyzer on the text to get the Tokens with position information. There is also some enhancements in the trunk (unreleased) version of Lucene you may try to store offset and position information in the index. Erik --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org --------------------------------- Yahoo! India Matrimony: Find your partner now. --0-791694259-1128516651=:14432--