Return-Path: Delivered-To: apmail-jakarta-lucene-user-archive@apache.org Received: (qmail 68423 invoked from network); 27 Mar 2002 23:18:23 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 27 Mar 2002 23:18:23 -0000 Received: (qmail 6423 invoked by uid 97); 27 Mar 2002 23:18:26 -0000 Delivered-To: qmlist-jakarta-archive-lucene-user@jakarta.apache.org Received: (qmail 6407 invoked by uid 97); 27 Mar 2002 23:18:25 -0000 Mailing-List: contact lucene-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Lucene Users List" Reply-To: "Lucene Users List" Delivered-To: mailing list lucene-user@jakarta.apache.org Received: (qmail 6396 invoked from network); 27 Mar 2002 23:18:25 -0000 From: Joe Hajek To: "Lucene Users List" Subject: Re: Field.Text arguments Date: Thu, 28 Mar 2002 00:18:24 +0100 (MET) Organization: blackbox.net Message-Id: <20020328.7216334@blackbox.net> In-Reply-To: References: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi, thats interesting. if you do a Field.Text(String name, Reader value) it should be indexed but not stored. strange i had no problems, but i didnt use a stringreader, just file readers. try to do create your customized field, passing a string that is not stored. i dont remember the documentation exactly, but this should be possible passing the right parameters to the field constructor. regards joe "Robert A. Decker" writes on Thu, 28 Mar 2002 00:22:36 +0100 (MET): > I'm confused about using Fields. > > Here's the two methods that are confusing me: > public static final Field Text(String name, Reader value) > public static final Field Text(String name, String value) > > The difference is that one takes a reader and the other a string. > > I have a field that will have pretty large contents after running > through > my analyzer (1500 to 6000 characters). > > When I use the second of the two methods above my string is not run > through the analyzer, but is stored in the index. > > When I use the first method, by passing in a StringReader based of > the > String, I don't get anything indexed at all (and therefore it's > difficult > to know if it was analyzed). > > > Is there some other Field type that I should be using for text that I > want > analyzed and indexed, and that the text can be fairly long? > > > Here's a rough order of I'm doing things. FragmentAnalyzer is my own > custom class that seems to normally work: > > Document document = new Document(); > Reader reader = new StringReader(text); > document.add(Field.Text("contents", reader)); > ... > FragmentAnalyzer analyzer = new FragmentAnalyzer(); > IndexWriter writer = new IndexWriter(pathToIndex, analyzer, > isCreateNewIndex); > writer.addDocument(document); > writer.close(); > > > rob > > > -- > To unsubscribe, e-mail: > > For additional commands, e-mail: > > -- To unsubscribe, e-mail: For additional commands, e-mail: