<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:old.nabble.com,2006:forum-45</id>
	<title>Nabble - Lucene - Java Users</title>
	<updated>2009-12-09T01:28:10Z</updated>
	<link rel="self" type="application/atom+xml" href="http://old.nabble.com/Lucene---Java-Users-f45.xml" />
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Lucene---Java-Users-f45.html" />
	<subtitle type="html"></subtitle>
	
<entry>
	<id>tag:old.nabble.com,2006:post-26707333</id>
	<title>RE: [VOTE] Push fast-vector-highlighter mvn artifacts for 3.0.0 and 2.9.1</title>
	<published>2009-12-09T01:28:10Z</published>
	<updated>2009-12-09T01:28:10Z</updated>
	<author>
		<name>Uwe Schindler</name>
	</author>
	<content type="html">Hi all,
&lt;br&gt;&lt;br&gt;The missing maven artifacts for the fast-vector-highlighter contrib of
&lt;br&gt;Lucene Java in version 2.9.1 and 3.0.0 are now available at:
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://repo1.maven.org/maven2/org/apache/lucene/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://repo1.maven.org/maven2/org/apache/lucene/&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://repo2.maven.org/maven2/org/apache/lucene/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://repo2.maven.org/maven2/org/apache/lucene/&lt;/a&gt;&lt;br&gt;&lt;br&gt;Uwe
&lt;br&gt;&lt;br&gt;-----
&lt;br&gt;Uwe Schindler
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26707333&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;uschindler@...&lt;/a&gt; 
&lt;br&gt;Apache Lucene Java Committer
&lt;br&gt;Bremen, Germany
&lt;br&gt;&lt;a href=&quot;http://lucene.apache.org/java/docs/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lucene.apache.org/java/docs/&lt;/a&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; From: Uwe Schindler [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26707333&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;uwe@...&lt;/a&gt;]
&lt;br&gt;&amp;gt; Sent: Tuesday, December 08, 2009 10:41 PM
&lt;br&gt;&amp;gt; To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26707333&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-dev@...&lt;/a&gt;; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26707333&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;general@...&lt;/a&gt;
&lt;br&gt;&amp;gt; Subject: RE: [VOTE] Push fast-vector-highlighter mvn artifacts for 3.0.0
&lt;br&gt;&amp;gt; and 2.9.1
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I got 3 binding votes from Grant, Mike, and Ted (and one from Simon, who
&lt;br&gt;&amp;gt; was
&lt;br&gt;&amp;gt; a big help on Sunday evening when I created the artifacts), so I push the
&lt;br&gt;&amp;gt; maven artifacts onto the rsync repo in few minutes.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Thanks!
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; -----
&lt;br&gt;&amp;gt; Uwe Schindler
&lt;br&gt;&amp;gt; H.-H.-Meier-Allee 63, D-28213 Bremen
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.thetaphi.de&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.thetaphi.de&lt;/a&gt;&lt;br&gt;&amp;gt; eMail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26707333&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;uwe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; -----Original Message-----
&lt;br&gt;&amp;gt; &amp;gt; From: Uwe Schindler [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26707333&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;uwe@...&lt;/a&gt;]
&lt;br&gt;&amp;gt; &amp;gt; Sent: Tuesday, December 08, 2009 7:03 PM
&lt;br&gt;&amp;gt; &amp;gt; To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26707333&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-dev@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &amp;gt; Subject: [VOTE] Push fast-vector-highlighter mvn artifacts for 3.0.0 and
&lt;br&gt;&amp;gt; &amp;gt; 2.9.1
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Sorry,
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; I initially didn't want to start a vote, as Grant only proposed to
&lt;br&gt;&amp;gt; &amp;quot;maybe
&lt;br&gt;&amp;gt; &amp;gt; start one&amp;quot;. But nobody responded (esp. to the questions in this mail) I
&lt;br&gt;&amp;gt; &amp;gt; ask
&lt;br&gt;&amp;gt; &amp;gt; again, an I will start the vote for now.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; ==========================================================================
&lt;br&gt;&amp;gt; &amp;gt; ==
&lt;br&gt;&amp;gt; &amp;gt; Please vote, that the missing artifacts for of fast-verctor-highlighter
&lt;br&gt;&amp;gt; of
&lt;br&gt;&amp;gt; &amp;gt; Lucene Java 2.9.1 and 3.0.0 should be pushed to repoX.maven.org.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; You can find the artifacts here:
&lt;br&gt;&amp;gt; &amp;gt; &lt;a href=&quot;http://people.apache.org/~uschindler/staging-area/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://people.apache.org/~uschindler/staging-area/&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; This dir contains only the maven folder to be copied to maven-rsync dir
&lt;br&gt;&amp;gt; on
&lt;br&gt;&amp;gt; &amp;gt; p.a.o. The top-level version in the maven metadata is 3.0.0, which
&lt;br&gt;&amp;gt; &amp;gt; conforms
&lt;br&gt;&amp;gt; &amp;gt; to the current state on maven (so during merging both folders during
&lt;br&gt;&amp;gt; &amp;gt; build,
&lt;br&gt;&amp;gt; &amp;gt; I set preference to metadata.xml of 3.0.0).
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; All files are signed by my PGP key (even the 2.9.1 ones; that release
&lt;br&gt;&amp;gt; was
&lt;br&gt;&amp;gt; &amp;gt; originally built by Mike McCandless).
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; ==========================================================================
&lt;br&gt;&amp;gt; &amp;gt; ==
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; What I additionally found out until now (because Simon nagged me):
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; If you compare the JAR files inside the binary ZIP file from the apache
&lt;br&gt;&amp;gt; &amp;gt; archive and the JAR files directly published on maven (for the other
&lt;br&gt;&amp;gt; &amp;gt; contribs), the MD5s/SHA1s are different even as they are created from
&lt;br&gt;&amp;gt; the
&lt;br&gt;&amp;gt; &amp;gt; same source code (because the timestamps inside the JAR are different,
&lt;br&gt;&amp;gt; for
&lt;br&gt;&amp;gt; &amp;gt; 2.9.1 another JDK compiler/platform was used). This interestingly does
&lt;br&gt;&amp;gt; not
&lt;br&gt;&amp;gt; &amp;gt; apply to lucene-core.jar in 3.0. Because of that I see no problem with
&lt;br&gt;&amp;gt; &amp;gt; this
&lt;br&gt;&amp;gt; &amp;gt; maven release, even that they are not the orginal JAR files from the
&lt;br&gt;&amp;gt; &amp;gt; binary
&lt;br&gt;&amp;gt; &amp;gt; distrib.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; What is not nice, is that the svn revision number in the manifest is
&lt;br&gt;&amp;gt; &amp;gt; different, but else is exactly the same, see my comments below in
&lt;br&gt;&amp;gt; earlier
&lt;br&gt;&amp;gt; &amp;gt; mails about changing the ant script for showing the SVN rev of the last
&lt;br&gt;&amp;gt; &amp;gt; changed file.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; So if nobody objects to release these rebuild jar files, all signed by
&lt;br&gt;&amp;gt; my
&lt;br&gt;&amp;gt; &amp;gt; key, I would like to simply put them on the maven-rsync folder.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Uwe
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; -----
&lt;br&gt;&amp;gt; &amp;gt; Uwe Schindler
&lt;br&gt;&amp;gt; &amp;gt; H.-H.-Meier-Allee 63, D-28213 Bremen
&lt;br&gt;&amp;gt; &amp;gt; &lt;a href=&quot;http://www.thetaphi.de&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.thetaphi.de&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt; eMail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26707333&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;uwe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; -----Original Message-----
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; From: Chris Hostetter [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26707333&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;hossman_lucene@...&lt;/a&gt;]
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; Sent: Tuesday, December 08, 2009 6:48 PM
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26707333&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-dev@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; Subject: Re: (NAG) Push fast-vector-highlighter mvn artifacts for 3.0
&lt;br&gt;&amp;gt; &amp;gt; and
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; 2.9
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : What to do now, any votes on adding the missing maven artifacts for
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : fast-vector-highlighter to 2.9.1 and 3.0.0 on the apache maven
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; reposititory?
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; It's not even clear to me that anything special needs to be done
&lt;br&gt;&amp;gt; before
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; publishing those jars to maven. &amp;nbsp;2.9.1 and 3.0.0 were already voted on
&lt;br&gt;&amp;gt; &amp;gt; and
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; released -- including all of the source code in them.
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; The safest bet least likely to anger the process gods is just to call
&lt;br&gt;&amp;gt; a
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; vote (new thread with VOTE in the subject) and cast a vote ...
&lt;br&gt;&amp;gt; &amp;gt; considering
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; the sources has already been reviewed it should go pretty quick.
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; :
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; I rebuilt the maven-dir for 2.9.1 and 3.0.0, merged them (3.0.0 is
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; top-
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; level
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; version) and extracted only fast-vector-highlighter:
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; &lt;a href=&quot;http://people.apache.org/~uschindler/staging-area/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://people.apache.org/~uschindler/staging-area/&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; I will copy this dir to the maven folder on people.a.o, when I got
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; votes
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; (how many)? At least someone should check the signatures.
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; By the way, we have a small error in our ant build.xml that
&lt;br&gt;&amp;gt; inserts
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; svnversion into the manifest file. This version is not the version
&lt;br&gt;&amp;gt; &amp;gt; of
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; the
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; last changed item (would be svnversion -c) but the current svn
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; version,
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; even
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; that I checked out the corresponding tags. It's no problem at all,
&lt;br&gt;&amp;gt; &amp;gt; but
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; not
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; very nice.
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; Maybe we should change build.xml to call &amp;quot;svnversion -c&amp;quot; in
&lt;br&gt;&amp;gt; future,
&lt;br&gt;&amp;gt; &amp;gt; to
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; get
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; the real number.
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; Uwe
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; -----
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; Uwe Schindler
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; H.-H.-Meier-Allee 63, D-28213 Bremen
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; &lt;a href=&quot;http://www.thetaphi.de&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.thetaphi.de&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; eMail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26707333&amp;i=10&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;uwe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; &amp;gt; -----Original Message-----
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; &amp;gt; From: Grant Ingersoll [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26707333&amp;i=11&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;gsingers@...&lt;/a&gt;]
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; &amp;gt; Sent: Saturday, December 05, 2009 10:26 PM
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; &amp;gt; To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26707333&amp;i=12&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-dev@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; &amp;gt; Subject: Re: Push fast-vector-highlighter mvn artifacts for 3.0
&lt;br&gt;&amp;gt; &amp;gt; and
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; 2.9
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; &amp;gt; I suppose we could put up the artifacts on a dev site and then
&lt;br&gt;&amp;gt; we
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; could
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; &amp;gt; vote to release both of them pretty quickly. &amp;nbsp;I think that
&lt;br&gt;&amp;gt; should
&lt;br&gt;&amp;gt; &amp;gt; be
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; easy
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; &amp;gt; to do, since it pretty much only involves verifying the jar and
&lt;br&gt;&amp;gt; &amp;gt; the
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; &amp;gt; signatures.
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; &amp;gt; On Dec 5, 2009, at 1:03 PM, Simon Willnauer wrote:
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; &amp;gt; &amp;gt; hi folks,
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; &amp;gt; &amp;gt; The maven artifacts for fast-vector-highlighter have never
&lt;br&gt;&amp;gt; been
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; pushed
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; &amp;gt; &amp;gt; since it was released because there were no pom.xml.template
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; inside
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; &amp;gt; &amp;gt; the module. I added a pom file a day ago in the context of
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; &amp;gt; &amp;gt; LUCENE-2107. I already talked to uwe and grant how to deal
&lt;br&gt;&amp;gt; with
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; this
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; &amp;gt; &amp;gt; issues and if we should push the artifact for Lucene 2.9 /
&lt;br&gt;&amp;gt; 3.0.
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; Since
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; &amp;gt; &amp;gt; this is only a metadata file we could consider rebuilding the
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; &amp;gt; &amp;gt; artefacts and publish them for those releases. I can not
&lt;br&gt;&amp;gt; &amp;gt; remember
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; that
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; &amp;gt; &amp;gt; anything like that happened before, so we should discuss how
&lt;br&gt;&amp;gt; to
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; deal
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; &amp;gt; &amp;gt; with this situation and if we should wait until 3.1.
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; &amp;gt; &amp;gt; simon
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; &amp;gt; &amp;gt; --------------------------------------------------------------
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; &amp;gt; --
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; ---
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; &amp;gt; &amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26707333&amp;i=13&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-dev-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; &amp;gt; &amp;gt; For additional commands, e-mail: java-dev-
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26707333&amp;i=14&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;help@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; &amp;gt; ----------------------------------------------------------------
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; &amp;gt; --
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; -
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; &amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26707333&amp;i=15&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-dev-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; &amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26707333&amp;i=16&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-dev-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; ------------------------------------------------------------------
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; &amp;gt; -
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26707333&amp;i=17&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-dev-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : &amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26707333&amp;i=18&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-dev-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; :
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; :
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; :
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : --------------------------------------------------------------------
&lt;br&gt;&amp;gt; -
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26707333&amp;i=19&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-dev-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; : For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26707333&amp;i=20&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-dev-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; :
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; -Hoss
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26707333&amp;i=21&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-dev-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26707333&amp;i=22&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-dev-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; &amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26707333&amp;i=23&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-dev-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26707333&amp;i=24&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-dev-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26707333&amp;i=25&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26707333&amp;i=26&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/RE%3A--VOTE--Push-fast-vector-highlighter-mvn-artifacts-for-3.0.0-and-2.9.1-tp26707333p26707333.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26706045</id>
	<title>Re: HOW to do date range searchi in 3.0</title>
	<published>2009-12-08T23:12:21Z</published>
	<updated>2009-12-08T23:12:21Z</updated>
	<author>
		<name>Weiwei Wang-2</name>
	</author>
	<content type="html">Thanks, Uwe. I've found the problem. the updateTime field is lost when i
&lt;br&gt;converted my index from an older version.
&lt;br&gt;&lt;br&gt;Another question, is there any detailed tutorial about Lucene 3.0.0?
&lt;br&gt;&lt;br&gt;2009/12/9 Uwe Schindler &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26706045&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;uwe@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; How did you index your date?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I would suggest to reindex the date using NumericField! And then query
&lt;br&gt;&amp;gt; using
&lt;br&gt;&amp;gt; NumericRangeQuery. If reindexing is not possible the Query like you have
&lt;br&gt;&amp;gt; done, should work. Please give us examples of how you indexed and how you
&lt;br&gt;&amp;gt; query.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Uwe
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; -----
&lt;br&gt;&amp;gt; Uwe Schindler
&lt;br&gt;&amp;gt; H.-H.-Meier-Allee 63, D-28213 Bremen
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.thetaphi.de&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.thetaphi.de&lt;/a&gt;&lt;br&gt;&amp;gt; eMail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26706045&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;uwe@...&lt;/a&gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; -----Original Message-----
&lt;br&gt;&amp;gt; &amp;gt; From: Weiwei Wang [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26706045&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ww.wang.cs@...&lt;/a&gt;]
&lt;br&gt;&amp;gt; &amp;gt; Sent: Wednesday, December 09, 2009 4:23 AM
&lt;br&gt;&amp;gt; &amp;gt; To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26706045&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &amp;gt; Subject: HOW to do date range searchi in 3.0
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Hi, all
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;I need to do a date range search like date:[a previous time to null]
&lt;br&gt;&amp;gt; &amp;gt; I used a filter to do this job, the code &amp;nbsp;is shown below:
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; Calendar c = Calendar.getInstance();
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; c.setTimeInMillis(c.getTimeInMillis() -
&lt;br&gt;&amp;gt; &amp;gt; parameter.getRecentUpdateConstraint()
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * RosaCrawlerConstants.ONE_DAY_IN_MILLISECOND);
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; String fromTime = DateTools.dateToString(c.getTime(),
&lt;br&gt;&amp;gt; &amp;gt; DateTools.Resolution.DAY);
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; Query updateTimeRange = new
&lt;br&gt;&amp;gt; &amp;gt; TermRangeQuery(&amp;quot;updateTime&amp;quot;,fromTime,null,true,false);
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; query.add(updateTimeRange, BooleanClause.Occur.MUST);
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; However, it doesn't work as before in version 2.4.1(I'm updating my
&lt;br&gt;&amp;gt; &amp;gt; project
&lt;br&gt;&amp;gt; &amp;gt; from version 2.4.1 to lucenen 3.0.0)
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Could anybody here offer me a solution?
&lt;br&gt;&amp;gt; &amp;gt; --
&lt;br&gt;&amp;gt; &amp;gt; Weiwei Wang
&lt;br&gt;&amp;gt; &amp;gt; Alex Wang
&lt;br&gt;&amp;gt; &amp;gt; 王巍巍
&lt;br&gt;&amp;gt; &amp;gt; Room 403, Mengmin Wei Building
&lt;br&gt;&amp;gt; &amp;gt; Computer Science Department
&lt;br&gt;&amp;gt; &amp;gt; Gulou Campus of Nanjing University
&lt;br&gt;&amp;gt; &amp;gt; Nanjing, P.R.China, 210093
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Homepage: &lt;a href=&quot;http://cs.nju.edu.cn/rl/weiweiwang&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://cs.nju.edu.cn/rl/weiweiwang&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26706045&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26706045&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Weiwei Wang
&lt;br&gt;Alex Wang
&lt;br&gt;王巍巍
&lt;br&gt;Room 403, Mengmin Wei Building
&lt;br&gt;Computer Science Department
&lt;br&gt;Gulou Campus of Nanjing University
&lt;br&gt;Nanjing, P.R.China, 210093
&lt;br&gt;&lt;br&gt;Homepage: &lt;a href=&quot;http://cs.nju.edu.cn/rl/weiweiwang&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://cs.nju.edu.cn/rl/weiweiwang&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/HOW-to-do-date-range-searchi-in-3.0-tp26704590p26706045.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26706029</id>
	<title>RE: HOW to do date range searchi in 3.0</title>
	<published>2009-12-08T23:09:24Z</published>
	<updated>2009-12-08T23:09:24Z</updated>
	<author>
		<name>Uwe Schindler</name>
	</author>
	<content type="html">How did you index your date?
&lt;br&gt;&lt;br&gt;I would suggest to reindex the date using NumericField! And then query using
&lt;br&gt;NumericRangeQuery. If reindexing is not possible the Query like you have
&lt;br&gt;done, should work. Please give us examples of how you indexed and how you
&lt;br&gt;query.
&lt;br&gt;&lt;br&gt;Uwe
&lt;br&gt;&lt;br&gt;-----
&lt;br&gt;Uwe Schindler
&lt;br&gt;H.-H.-Meier-Allee 63, D-28213 Bremen
&lt;br&gt;&lt;a href=&quot;http://www.thetaphi.de&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.thetaphi.de&lt;/a&gt;&lt;br&gt;eMail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26706029&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;uwe@...&lt;/a&gt;
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; -----Original Message-----
&lt;br&gt;&amp;gt; From: Weiwei Wang [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26706029&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ww.wang.cs@...&lt;/a&gt;]
&lt;br&gt;&amp;gt; Sent: Wednesday, December 09, 2009 4:23 AM
&lt;br&gt;&amp;gt; To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26706029&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user@...&lt;/a&gt;
&lt;br&gt;&amp;gt; Subject: HOW to do date range searchi in 3.0
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Hi, all
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;I need to do a date range search like date:[a previous time to null]
&lt;br&gt;&amp;gt; I used a filter to do this job, the code &amp;nbsp;is shown below:
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; Calendar c = Calendar.getInstance();
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; c.setTimeInMillis(c.getTimeInMillis() -
&lt;br&gt;&amp;gt; parameter.getRecentUpdateConstraint()
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * RosaCrawlerConstants.ONE_DAY_IN_MILLISECOND);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; String fromTime = DateTools.dateToString(c.getTime(),
&lt;br&gt;&amp;gt; DateTools.Resolution.DAY);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; Query updateTimeRange = new
&lt;br&gt;&amp;gt; TermRangeQuery(&amp;quot;updateTime&amp;quot;,fromTime,null,true,false);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; query.add(updateTimeRange, BooleanClause.Occur.MUST);
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; However, it doesn't work as before in version 2.4.1(I'm updating my
&lt;br&gt;&amp;gt; project
&lt;br&gt;&amp;gt; from version 2.4.1 to lucenen 3.0.0)
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Could anybody here offer me a solution?
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; Weiwei Wang
&lt;br&gt;&amp;gt; Alex Wang
&lt;br&gt;&amp;gt; 王巍巍
&lt;br&gt;&amp;gt; Room 403, Mengmin Wei Building
&lt;br&gt;&amp;gt; Computer Science Department
&lt;br&gt;&amp;gt; Gulou Campus of Nanjing University
&lt;br&gt;&amp;gt; Nanjing, P.R.China, 210093
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Homepage: &lt;a href=&quot;http://cs.nju.edu.cn/rl/weiweiwang&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://cs.nju.edu.cn/rl/weiweiwang&lt;/a&gt;&lt;/div&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26706029&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26706029&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/HOW-to-do-date-range-searchi-in-3.0-tp26704590p26706029.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26705941</id>
	<title>Re: FileNotFoundException on index</title>
	<published>2009-12-08T22:56:05Z</published>
	<updated>2009-12-08T22:56:05Z</updated>
	<author>
		<name>Max Lynch-3</name>
	</author>
	<content type="html">Hi Mike,
&lt;br&gt;&lt;br&gt;Missed your response on this,
&lt;br&gt;What I was doing was physically removing index/write.lock if older than 8
&lt;br&gt;hours, allowing another process of my indexer to run. &amp;nbsp;I realize in
&lt;br&gt;hindsight that there is no reason why I should be doing this and it was
&lt;br&gt;really stupid. &amp;nbsp;I think I was under the impression one of my pylucene
&lt;br&gt;processes was hanging.
&lt;br&gt;&lt;br&gt;On Fri, Oct 9, 2009 at 3:44 AM, Michael McCandless &amp;lt;
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26705941&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lucene@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; You can use o.a.l.index.CheckIndex to fix the index. &amp;nbsp;It will remove
&lt;br&gt;&amp;gt; references to any segments that are missing or have problems during
&lt;br&gt;&amp;gt; testing. &amp;nbsp;First run it without -fix to see what problems there are.
&lt;br&gt;&amp;gt; Then take a backup of the index. &amp;nbsp;Then run it with -fix. &amp;nbsp;The index
&lt;br&gt;&amp;gt; will lose all docs in those segments that it removes.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Can you describe what led up to this? &amp;nbsp;Is it repeatable?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Mike
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Fri, Oct 9, 2009 at 12:37 AM, Max Lynch &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26705941&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ihasmax@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; &amp;gt; Missed your response, thanks Bernd.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; I don't think that's it, since I haven't been executing any commands like
&lt;br&gt;&amp;gt; &amp;gt; that. &amp;nbsp;The only thing I could think of is corruption. &amp;nbsp;I've got the index
&lt;br&gt;&amp;gt; &amp;gt; backed up in case there is a way to fix it (it won't matter in a week or
&lt;br&gt;&amp;gt; so
&lt;br&gt;&amp;gt; &amp;gt; since I cull any documents older than 25 days).
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Is there a way to fix this?
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Thanks.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; On Thu, Oct 8, 2009 at 3:01 AM, Bernd Fondermann &amp;lt;
&lt;br&gt;&amp;gt; &amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26705941&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;bernd.fondermann@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Hi Max
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; just a guess: maybe you deleted all *.c source files in that area and
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; unintentionally deleted this index file, too.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;nbsp;Bernd
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; On Fri, Oct 2, 2009 at 17:10, Max Lynch &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26705941&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ihasmax@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; I'm getting this error when I try to run my searcher and my indexer:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; Traceback (most recent call last):
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; self.searcher = lucene.IndexSearcher(self.directory)
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; JavaError: java.io.FileNotFoundException:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; /home/spider/misc/index/_275c.cfs
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; (No such file or directory)
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; I don't know anything about the format of the Lucene index, but I
&lt;br&gt;&amp;gt; notice
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; I
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; have several _275* files from b to j but no c.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; Any ideas?
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; Thanks.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26705941&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26705941&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26705941&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26705941&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/FileNotFoundException-on-index-tp25717530p26705941.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26704590</id>
	<title>HOW to do date range searchi in 3.0</title>
	<published>2009-12-08T19:23:02Z</published>
	<updated>2009-12-08T19:23:02Z</updated>
	<author>
		<name>Weiwei Wang-2</name>
	</author>
	<content type="html">Hi, all
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;I need to do a date range search like date:[a previous time to null]
&lt;br&gt;I used a filter to do this job, the code &amp;nbsp;is shown below:
&lt;br&gt;&amp;nbsp; &amp;nbsp; Calendar c = Calendar.getInstance();
&lt;br&gt;&amp;nbsp; &amp;nbsp; c.setTimeInMillis(c.getTimeInMillis() -
&lt;br&gt;parameter.getRecentUpdateConstraint()
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * RosaCrawlerConstants.ONE_DAY_IN_MILLISECOND);
&lt;br&gt;&amp;nbsp; &amp;nbsp; String fromTime = DateTools.dateToString(c.getTime(),
&lt;br&gt;DateTools.Resolution.DAY);
&lt;br&gt;&amp;nbsp; &amp;nbsp; Query updateTimeRange = new
&lt;br&gt;TermRangeQuery(&amp;quot;updateTime&amp;quot;,fromTime,null,true,false);
&lt;br&gt;&amp;nbsp; &amp;nbsp; query.add(updateTimeRange, BooleanClause.Occur.MUST);
&lt;br&gt;&lt;br&gt;However, it doesn't work as before in version 2.4.1(I'm updating my project
&lt;br&gt;from version 2.4.1 to lucenen 3.0.0)
&lt;br&gt;&lt;br&gt;Could anybody here offer me a solution?
&lt;br&gt;-- 
&lt;br&gt;Weiwei Wang
&lt;br&gt;Alex Wang
&lt;br&gt;王巍巍
&lt;br&gt;Room 403, Mengmin Wei Building
&lt;br&gt;Computer Science Department
&lt;br&gt;Gulou Campus of Nanjing University
&lt;br&gt;Nanjing, P.R.China, 210093
&lt;br&gt;&lt;br&gt;Homepage: &lt;a href=&quot;http://cs.nju.edu.cn/rl/weiweiwang&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://cs.nju.edu.cn/rl/weiweiwang&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/HOW-to-do-date-range-searchi-in-3.0-tp26704590p26704590.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26703367</id>
	<title>NearSpansUnordered payloads not returning all the time</title>
	<published>2009-12-08T16:34:07Z</published>
	<updated>2009-12-08T16:34:07Z</updated>
	<author>
		<name>Jason Rutherglen-2</name>
	</author>
	<content type="html">Howdy,
&lt;br&gt;&lt;br&gt;I am wondering if anyone has seen
&lt;br&gt;NearSpansUnordered.getPayload() not return payloads that are
&lt;br&gt;verifiably accessible via IR.termPositions? It's a bit confusing
&lt;br&gt;because most of the time they're returned properly.
&lt;br&gt;&lt;br&gt;I suspect the payload logic gets tripped up in
&lt;br&gt;NearSpansUnordered. I'll put together a test case, however the
&lt;br&gt;difficulty is that we're only seeing the issue with largish 800
&lt;br&gt;MB indexes, which could make the test case a little crazy.
&lt;br&gt;&lt;br&gt;Jason
&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26703367&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26703367&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/NearSpansUnordered-payloads-not-returning-all-the-time-tp26703367p26703367.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26701349</id>
	<title>RE: TopFieldDocCollector and v3.0.0</title>
	<published>2009-12-08T13:43:53Z</published>
	<updated>2009-12-08T13:43:53Z</updated>
	<author>
		<name>Uwe Schindler</name>
	</author>
	<content type="html">Sorry wrong word, Germans often have the problem with English &amp;quot;must&amp;quot;. It has
&lt;br&gt;to be to be &amp;quot;but you must not&amp;quot;.
&lt;br&gt;&lt;br&gt;Uwe
&lt;br&gt;&lt;br&gt;-----
&lt;br&gt;Uwe Schindler
&lt;br&gt;H.-H.-Meier-Allee 63, D-28213 Bremen
&lt;br&gt;&lt;a href=&quot;http://www.thetaphi.de&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.thetaphi.de&lt;/a&gt;&lt;br&gt;eMail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26701349&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;uwe@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; -----Original Message-----
&lt;br&gt;&amp;gt; From: Steven A Rowe [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26701349&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sarowe@...&lt;/a&gt;]
&lt;br&gt;&amp;gt; Sent: Tuesday, December 08, 2009 8:42 PM
&lt;br&gt;&amp;gt; To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26701349&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user@...&lt;/a&gt;
&lt;br&gt;&amp;gt; Subject: RE: TopFieldDocCollector and v3.0.0
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Hi Uwe,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; On 12/08/2009 at 9:40 AM, Uwe Schindler wrote:
&lt;br&gt;&amp;gt; &amp;gt; After the move to 3.0, you can (but you must not) further update
&lt;br&gt;&amp;gt; &amp;gt; your code to use generics, which is not really needed but will
&lt;br&gt;&amp;gt; &amp;gt; remove all compiler warnings.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; This sounds like you're telling people that although they are able to
&lt;br&gt;&amp;gt; update their code to use generics, it is forbidden.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I'm sure, though, that you mean that they are not required to do so:
&lt;br&gt;&amp;gt; something like &amp;quot;but you need not&amp;quot; rather than &amp;quot;but you must not&amp;quot;.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Steve
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26701349&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26701349&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26701349&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26701349&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/TopFieldDocCollector-and-v3.0.0-tp26689404p26701349.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26700369</id>
	<title>Re: question related to Indexing</title>
	<published>2009-12-08T12:41:48Z</published>
	<updated>2009-12-08T12:41:48Z</updated>
	<author>
		<name>Phanindra Reva</name>
	</author>
	<content type="html">Hello Tom and Erick,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; I am really sorry for posting such a dull
&lt;br&gt;question. Meanwhile I have explored a few other parts of API,
&lt;br&gt;fortunately I have found a place which could exaclty fit for my case.
&lt;br&gt;Thanks for patiently trying to understand my question.. and warning
&lt;br&gt;me.
&lt;br&gt;Bye.
&lt;br&gt;&lt;br&gt;On Tue, Dec 8, 2009 at 9:21 PM, Tom Hill &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26700369&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;solr-list@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; If you tell us WHY you want to do this, rather than HOW you want to do it,
&lt;br&gt;&amp;gt; the chances are much better that someone can help.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; What's the business motivation here?  What does the end user want to
&lt;br&gt;&amp;gt; achieve?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Tom
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Tue, Dec 8, 2009 at 8:16 AM, Phanindra Reva &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26700369&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;reva.phanindra@...&lt;/a&gt;&amp;gt;wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Hello,
&lt;br&gt;&amp;gt;&amp;gt;        Thanks for the reply. *strange* was expected. I am trying to
&lt;br&gt;&amp;gt;&amp;gt; store field names as payloads, so I need unedited field names during
&lt;br&gt;&amp;gt;&amp;gt; analysis part. And later my plan is to replace all the field names
&lt;br&gt;&amp;gt;&amp;gt; with a default value and then store the document in the index. So, If
&lt;br&gt;&amp;gt;&amp;gt; its possible to get the reference of the Document after the analysis,
&lt;br&gt;&amp;gt;&amp;gt; I could modify all the field names. Even a way of modifying ( of
&lt;br&gt;&amp;gt;&amp;gt; course , it should be after analysis and before adding to the index )
&lt;br&gt;&amp;gt;&amp;gt; the field-name values that are going to be added to the index will
&lt;br&gt;&amp;gt;&amp;gt; suffice.
&lt;br&gt;&amp;gt;&amp;gt;     I guess.. this time you feel its much more strange, but that's my
&lt;br&gt;&amp;gt;&amp;gt; task for which above mentioned is one way to accomplish.
&lt;br&gt;&amp;gt;&amp;gt; Thanks.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; On Tue, Dec 8, 2009 at 4:55 PM, Erick Erickson &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26700369&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;erickerickson@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; You're right, it *does* seem strange &amp;lt;G&amp;gt;....
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; I'm having a really hard time imagining a use-case
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; for this capability, so it's hard to suggest
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; an approach. Perhaps you could supply
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; an outline of your use-case? This may be
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; an XY problem.
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; Best
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; Erick
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; On Tue, Dec 8, 2009 at 10:12 AM, Phanindra Reva &amp;lt;
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26700369&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;reva.phanindra@...&lt;/a&gt;&amp;gt;wrote:
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; Hello All,
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;              I am a newbie using Lucene. To be brief, I am just
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; wondering whether is there a point where we get the access to the
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; org.apache.lucene.document.Document (which is being indexed at the
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; moment)  after the analysing part is completed but exactly before it
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; is added to the index. My whole aim is to modify all the field names
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; present in the document before its being added to the index, but I
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; need those field names un-edited during the analysis part.
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;   If it seems strange.. please don't mind.
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; Thanks.
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26700369&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26700369&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26700369&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26700369&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26700369&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26700369&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/question-related-to-Indexing-tp26695382p26700369.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26700083</id>
	<title>Re: question related to Indexing</title>
	<published>2009-12-08T12:21:36Z</published>
	<updated>2009-12-08T12:21:36Z</updated>
	<author>
		<name>Tom Hill-7</name>
	</author>
	<content type="html">If you tell us WHY you want to do this, rather than HOW you want to do it,
&lt;br&gt;the chances are much better that someone can help.
&lt;br&gt;&lt;br&gt;What's the business motivation here? &amp;nbsp;What does the end user want to
&lt;br&gt;achieve?
&lt;br&gt;&lt;br&gt;Tom
&lt;br&gt;&lt;br&gt;On Tue, Dec 8, 2009 at 8:16 AM, Phanindra Reva &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26700083&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;reva.phanindra@...&lt;/a&gt;&amp;gt;wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hello,
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Thanks for the reply. *strange* was expected. I am trying to
&lt;br&gt;&amp;gt; store field names as payloads, so I need unedited field names during
&lt;br&gt;&amp;gt; analysis part. And later my plan is to replace all the field names
&lt;br&gt;&amp;gt; with a default value and then store the document in the index. So, If
&lt;br&gt;&amp;gt; its possible to get the reference of the Document after the analysis,
&lt;br&gt;&amp;gt; I could modify all the field names. Even a way of modifying ( of
&lt;br&gt;&amp;gt; course , it should be after analysis and before adding to the index )
&lt;br&gt;&amp;gt; the field-name values that are going to be added to the index will
&lt;br&gt;&amp;gt; suffice.
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; I guess.. this time you feel its much more strange, but that's my
&lt;br&gt;&amp;gt; task for which above mentioned is one way to accomplish.
&lt;br&gt;&amp;gt; Thanks.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Tue, Dec 8, 2009 at 4:55 PM, Erick Erickson &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26700083&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;erickerickson@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; &amp;gt; You're right, it *does* seem strange &amp;lt;G&amp;gt;....
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; I'm having a really hard time imagining a use-case
&lt;br&gt;&amp;gt; &amp;gt; for this capability, so it's hard to suggest
&lt;br&gt;&amp;gt; &amp;gt; an approach. Perhaps you could supply
&lt;br&gt;&amp;gt; &amp;gt; an outline of your use-case? This may be
&lt;br&gt;&amp;gt; &amp;gt; an XY problem.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Best
&lt;br&gt;&amp;gt; &amp;gt; Erick
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; On Tue, Dec 8, 2009 at 10:12 AM, Phanindra Reva &amp;lt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26700083&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;reva.phanindra@...&lt;/a&gt;&amp;gt;wrote:
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Hello All,
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I am a newbie using Lucene. To be brief, I am just
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; wondering whether is there a point where we get the access to the
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; org.apache.lucene.document.Document (which is being indexed at the
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; moment) &amp;nbsp;after the analysing part is completed but exactly before it
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; is added to the index. My whole aim is to modify all the field names
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; present in the document before its being added to the index, but I
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; need those field names un-edited during the analysis part.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;nbsp; If it seems strange.. please don't mind.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Thanks.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26700083&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26700083&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26700083&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26700083&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/question-related-to-Indexing-tp26695382p26700083.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26699527</id>
	<title>RE: TopFieldDocCollector and v3.0.0</title>
	<published>2009-12-08T11:41:34Z</published>
	<updated>2009-12-08T11:41:34Z</updated>
	<author>
		<name>Steven A Rowe</name>
	</author>
	<content type="html">Hi Uwe,
&lt;br&gt;&lt;br&gt;On 12/08/2009 at 9:40 AM, Uwe Schindler wrote:
&lt;br&gt;&amp;gt; After the move to 3.0, you can (but you must not) further update
&lt;br&gt;&amp;gt; your code to use generics, which is not really needed but will
&lt;br&gt;&amp;gt; remove all compiler warnings.
&lt;br&gt;&lt;br&gt;This sounds like you're telling people that although they are able to update their code to use generics, it is forbidden.
&lt;br&gt;&lt;br&gt;I'm sure, though, that you mean that they are not required to do so: something like &amp;quot;but you need not&amp;quot; rather than &amp;quot;but you must not&amp;quot;.
&lt;br&gt;&lt;br&gt;Steve
&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26699527&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26699527&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/TopFieldDocCollector-and-v3.0.0-tp26689404p26699527.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26697352</id>
	<title>Re: Problem searching field with % as value</title>
	<published>2009-12-08T09:18:23Z</published>
	<updated>2009-12-08T09:18:23Z</updated>
	<author>
		<name>Ian Lea</name>
	</author>
	<content type="html">If you store the field unanalyzed it will be indexed as is. &amp;nbsp;You can
&lt;br&gt;then search for it via a TermQuery, or use QueryParser with
&lt;br&gt;PerFieldAnalyzerWrapper specifying KeywordAnalyzer for the field
&lt;br&gt;containing this character.
&lt;br&gt;&lt;br&gt;Another approach is to replace the % with something easier to work
&lt;br&gt;with. &amp;nbsp;You could do this yourself or, I think, with MappingCharFilter.
&lt;br&gt;&lt;br&gt;Personally I'd probably replace &amp;quot;%&amp;quot; with &amp;quot;percent&amp;quot; somewhere in my
&lt;br&gt;code with a simple string replacement.
&lt;br&gt;&lt;br&gt;&lt;br&gt;--
&lt;br&gt;Ian.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;On Tue, Dec 8, 2009 at 5:02 PM, kanayo &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26697352&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;richies4all@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks for your reply Erick.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; In Luke, its also not working. I tried to retrieving values from the field
&lt;br&gt;&amp;gt; by specifying the field as the search field and then specify % as the search
&lt;br&gt;&amp;gt; parameter which using StandardAnalyzer but nothing is displayed. Also while
&lt;br&gt;&amp;gt; Luke shows the query details for other search values, it dosent show query
&lt;br&gt;&amp;gt; details for search value of %.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I think it is not Tokenized in the index. Is there anything else i can do to
&lt;br&gt;&amp;gt; be able to retrieve values from fields comprising of just %?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks for your assistance.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Erick Erickson wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Try printing out query.toString() to see what's actually being
&lt;br&gt;&amp;gt;&amp;gt; sent to the searcher.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; You can try the same thing in Luke, specifying StandardAnalyzer
&lt;br&gt;&amp;gt;&amp;gt; to parse queries.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Are you sure you're specifying the fields in the query and not just the
&lt;br&gt;&amp;gt;&amp;gt; '%'? That would go against your default field.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; When you say that you can see the fields in luke, are you storing the
&lt;br&gt;&amp;gt;&amp;gt; field?
&lt;br&gt;&amp;gt;&amp;gt; Because what you may be seeing is the *stored* value rather than the
&lt;br&gt;&amp;gt;&amp;gt; *tokens*.
&lt;br&gt;&amp;gt;&amp;gt; Make sure you're looking at the tokens in Luke..
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; If none of that helps, could you post a code snippet or two (index and
&lt;br&gt;&amp;gt;&amp;gt; query)?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Best
&lt;br&gt;&amp;gt;&amp;gt; Erick
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; On Tue, Dec 8, 2009 at 11:04 AM, kanayo &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26697352&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;richies4all@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; I am a newbie to lucene. I am using Standard Analyzer in my lucene
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; project.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; I am indexing some fields which may contain only &amp;quot;%&amp;quot; as a field value and
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; it
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; indexes fine and i can view the value against the field in the index
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; using
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Luke.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; However when i try to retrieve the same field using indexsearcher and
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; passing &amp;quot;%&amp;quot; as a query parameter nothing is retrieved. It is simply being
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; ignored. I have also tried to escape the &amp;quot;%&amp;quot; while searching but still no
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; results.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Is there anything am not doing right?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Thanks in advance for your assistance.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; --
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; View this message in context:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/Problem-searching-field-with---as-value-tp26696184p26696184.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/Problem-searching-field-with---as-value-tp26696184p26696184.html&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Sent from the Lucene - Java Users mailing list archive at Nabble.com.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26697352&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26697352&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; View this message in context: &lt;a href=&quot;http://old.nabble.com/Problem-searching-field-with---as-value-tp26696184p26696993.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/Problem-searching-field-with---as-value-tp26696184p26696993.html&lt;/a&gt;&lt;br&gt;&amp;gt; Sent from the Lucene - Java Users mailing list archive at Nabble.com.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26697352&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26697352&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26697352&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26697352&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Problem-searching-field-with---as-value-tp26696184p26697352.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26696993</id>
	<title>Re: Problem searching field with % as value</title>
	<published>2009-12-08T09:02:21Z</published>
	<updated>2009-12-08T09:02:21Z</updated>
	<author>
		<name>kanayo</name>
	</author>
	<content type="html">Thanks for your reply Erick.
&lt;br&gt;&lt;br&gt;In Luke, its also not working. I tried to retrieving values from the field by specifying the field as the search field and then specify % as the search parameter which using StandardAnalyzer but nothing is displayed. Also while Luke shows the query details for other search values, it dosent show query details for search value of %.
&lt;br&gt;&lt;br&gt;I think it is not Tokenized in the index. Is there anything else i can do to be able to retrieve values from fields comprising of just %?
&lt;br&gt;&lt;br&gt;Thanks for your assistance.
&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Erick Erickson wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;Try printing out query.toString() to see what's actually being
&lt;br&gt;sent to the searcher.
&lt;br&gt;&lt;br&gt;You can try the same thing in Luke, specifying StandardAnalyzer
&lt;br&gt;to parse queries.
&lt;br&gt;&lt;br&gt;Are you sure you're specifying the fields in the query and not just the
&lt;br&gt;'%'? That would go against your default field.
&lt;br&gt;&lt;br&gt;When you say that you can see the fields in luke, are you storing the field?
&lt;br&gt;Because what you may be seeing is the *stored* value rather than the
&lt;br&gt;*tokens*.
&lt;br&gt;Make sure you're looking at the tokens in Luke..
&lt;br&gt;&lt;br&gt;If none of that helps, could you post a code snippet or two (index and
&lt;br&gt;query)?
&lt;br&gt;&lt;br&gt;Best
&lt;br&gt;Erick
&lt;br&gt;&lt;br&gt;On Tue, Dec 8, 2009 at 11:04 AM, kanayo &amp;lt;richies4all@gmail.com&amp;gt; wrote:
&lt;br&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I am a newbie to lucene. I am using Standard Analyzer in my lucene project.
&lt;br&gt;&amp;gt; I am indexing some fields which may contain only &amp;quot;%&amp;quot; as a field value and
&lt;br&gt;&amp;gt; it
&lt;br&gt;&amp;gt; indexes fine and i can view the value against the field in the index using
&lt;br&gt;&amp;gt; Luke.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; However when i try to retrieve the same field using indexsearcher and
&lt;br&gt;&amp;gt; passing &amp;quot;%&amp;quot; as a query parameter nothing is retrieved. It is simply being
&lt;br&gt;&amp;gt; ignored. I have also tried to escape the &amp;quot;%&amp;quot; while searching but still no
&lt;br&gt;&amp;gt; results.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Is there anything am not doing right?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks in advance for your assistance.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; View this message in context:
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/Problem-searching-field-with---as-value-tp26696184p26696184.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/Problem-searching-field-with---as-value-tp26696184p26696184.html&lt;/a&gt;&lt;br&gt;&amp;gt; Sent from the Lucene - Java Users mailing list archive at Nabble.com.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
&lt;br&gt;&amp;gt; For additional commands, e-mail: java-user-help@lucene.apache.org
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Problem-searching-field-with---as-value-tp26696184p26696993.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26696453</id>
	<title>Re: Problem searching field with % as value</title>
	<published>2009-12-08T08:20:01Z</published>
	<updated>2009-12-08T08:20:01Z</updated>
	<author>
		<name>Erick Erickson</name>
	</author>
	<content type="html">Try printing out query.toString() to see what's actually being
&lt;br&gt;sent to the searcher.
&lt;br&gt;&lt;br&gt;You can try the same thing in Luke, specifying StandardAnalyzer
&lt;br&gt;to parse queries.
&lt;br&gt;&lt;br&gt;Are you sure you're specifying the fields in the query and not just the
&lt;br&gt;'%'? That would go against your default field.
&lt;br&gt;&lt;br&gt;When you say that you can see the fields in luke, are you storing the field?
&lt;br&gt;Because what you may be seeing is the *stored* value rather than the
&lt;br&gt;*tokens*.
&lt;br&gt;Make sure you're looking at the tokens in Luke..
&lt;br&gt;&lt;br&gt;If none of that helps, could you post a code snippet or two (index and
&lt;br&gt;query)?
&lt;br&gt;&lt;br&gt;Best
&lt;br&gt;Erick
&lt;br&gt;&lt;br&gt;On Tue, Dec 8, 2009 at 11:04 AM, kanayo &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26696453&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;richies4all@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I am a newbie to lucene. I am using Standard Analyzer in my lucene project.
&lt;br&gt;&amp;gt; I am indexing some fields which may contain only &amp;quot;%&amp;quot; as a field value and
&lt;br&gt;&amp;gt; it
&lt;br&gt;&amp;gt; indexes fine and i can view the value against the field in the index using
&lt;br&gt;&amp;gt; Luke.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; However when i try to retrieve the same field using indexsearcher and
&lt;br&gt;&amp;gt; passing &amp;quot;%&amp;quot; as a query parameter nothing is retrieved. It is simply being
&lt;br&gt;&amp;gt; ignored. I have also tried to escape the &amp;quot;%&amp;quot; while searching but still no
&lt;br&gt;&amp;gt; results.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Is there anything am not doing right?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks in advance for your assistance.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; View this message in context:
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/Problem-searching-field-with---as-value-tp26696184p26696184.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/Problem-searching-field-with---as-value-tp26696184p26696184.html&lt;/a&gt;&lt;br&gt;&amp;gt; Sent from the Lucene - Java Users mailing list archive at Nabble.com.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26696453&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26696453&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Problem-searching-field-with---as-value-tp26696184p26696453.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26696394</id>
	<title>Re: question related to Indexing</title>
	<published>2009-12-08T08:16:25Z</published>
	<updated>2009-12-08T08:16:25Z</updated>
	<author>
		<name>Phanindra Reva</name>
	</author>
	<content type="html">Hello,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Thanks for the reply. *strange* was expected. I am trying to
&lt;br&gt;store field names as payloads, so I need unedited field names during
&lt;br&gt;analysis part. And later my plan is to replace all the field names
&lt;br&gt;with a default value and then store the document in the index. So, If
&lt;br&gt;its possible to get the reference of the Document after the analysis,
&lt;br&gt;I could modify all the field names. Even a way of modifying ( of
&lt;br&gt;course , it should be after analysis and before adding to the index )
&lt;br&gt;the field-name values that are going to be added to the index will
&lt;br&gt;suffice.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;I guess.. this time you feel its much more strange, but that's my
&lt;br&gt;task for which above mentioned is one way to accomplish.
&lt;br&gt;Thanks.
&lt;br&gt;&lt;br&gt;On Tue, Dec 8, 2009 at 4:55 PM, Erick Erickson &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26696394&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;erickerickson@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; You're right, it *does* seem strange &amp;lt;G&amp;gt;....
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I'm having a really hard time imagining a use-case
&lt;br&gt;&amp;gt; for this capability, so it's hard to suggest
&lt;br&gt;&amp;gt; an approach. Perhaps you could supply
&lt;br&gt;&amp;gt; an outline of your use-case? This may be
&lt;br&gt;&amp;gt; an XY problem.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Best
&lt;br&gt;&amp;gt; Erick
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Tue, Dec 8, 2009 at 10:12 AM, Phanindra Reva &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26696394&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;reva.phanindra@...&lt;/a&gt;&amp;gt;wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Hello All,
&lt;br&gt;&amp;gt;&amp;gt;              I am a newbie using Lucene. To be brief, I am just
&lt;br&gt;&amp;gt;&amp;gt; wondering whether is there a point where we get the access to the
&lt;br&gt;&amp;gt;&amp;gt; org.apache.lucene.document.Document (which is being indexed at the
&lt;br&gt;&amp;gt;&amp;gt; moment)  after the analysing part is completed but exactly before it
&lt;br&gt;&amp;gt;&amp;gt; is added to the index. My whole aim is to modify all the field names
&lt;br&gt;&amp;gt;&amp;gt; present in the document before its being added to the index, but I
&lt;br&gt;&amp;gt;&amp;gt; need those field names un-edited during the analysis part.
&lt;br&gt;&amp;gt;&amp;gt;   If it seems strange.. please don't mind.
&lt;br&gt;&amp;gt;&amp;gt; Thanks.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26696394&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26696394&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26696394&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26696394&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/question-related-to-Indexing-tp26695382p26696394.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26696184</id>
	<title>Problem searching field with % as value</title>
	<published>2009-12-08T08:04:42Z</published>
	<updated>2009-12-08T08:04:42Z</updated>
	<author>
		<name>kanayo</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;I am a newbie to lucene. I am using Standard Analyzer in my lucene project. 
&lt;br&gt;I am indexing some fields which may contain only &amp;quot;%&amp;quot; as a field value and it indexes fine and i can view the value against the field in the index using Luke.
&lt;br&gt;&lt;br&gt;However when i try to retrieve the same field using indexsearcher and passing &amp;quot;%&amp;quot; as a query parameter nothing is retrieved. It is simply being ignored. I have also tried to escape the &amp;quot;%&amp;quot; while searching but still no results.
&lt;br&gt;&lt;br&gt;Is there anything am not doing right?
&lt;br&gt;&lt;br&gt;Thanks in advance for your assistance.
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Problem-searching-field-with---as-value-tp26696184p26696184.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26696059</id>
	<title>Re: question related to Indexing</title>
	<published>2009-12-08T07:55:52Z</published>
	<updated>2009-12-08T07:55:52Z</updated>
	<author>
		<name>Erick Erickson</name>
	</author>
	<content type="html">You're right, it *does* seem strange &amp;lt;G&amp;gt;....
&lt;br&gt;&lt;br&gt;I'm having a really hard time imagining a use-case
&lt;br&gt;for this capability, so it's hard to suggest
&lt;br&gt;an approach. Perhaps you could supply
&lt;br&gt;an outline of your use-case? This may be
&lt;br&gt;an XY problem.
&lt;br&gt;&lt;br&gt;Best
&lt;br&gt;Erick
&lt;br&gt;&lt;br&gt;On Tue, Dec 8, 2009 at 10:12 AM, Phanindra Reva &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26696059&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;reva.phanindra@...&lt;/a&gt;&amp;gt;wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hello All,
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I am a newbie using Lucene. To be brief, I am just
&lt;br&gt;&amp;gt; wondering whether is there a point where we get the access to the
&lt;br&gt;&amp;gt; org.apache.lucene.document.Document (which is being indexed at the
&lt;br&gt;&amp;gt; moment) &amp;nbsp;after the analysing part is completed but exactly before it
&lt;br&gt;&amp;gt; is added to the index. My whole aim is to modify all the field names
&lt;br&gt;&amp;gt; present in the document before its being added to the index, but I
&lt;br&gt;&amp;gt; need those field names un-edited during the analysis part.
&lt;br&gt;&amp;gt; &amp;nbsp; If it seems strange.. please don't mind.
&lt;br&gt;&amp;gt; Thanks.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26696059&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26696059&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/question-related-to-Indexing-tp26695382p26696059.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26695382</id>
	<title>question related to Indexing</title>
	<published>2009-12-08T07:12:46Z</published>
	<updated>2009-12-08T07:12:46Z</updated>
	<author>
		<name>Phanindra Reva</name>
	</author>
	<content type="html">Hello All,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; I am a newbie using Lucene. To be brief, I am just
&lt;br&gt;wondering whether is there a point where we get the access to the
&lt;br&gt;org.apache.lucene.document.Document (which is being indexed at the
&lt;br&gt;moment) &amp;nbsp;after the analysing part is completed but exactly before it
&lt;br&gt;is added to the index. My whole aim is to modify all the field names
&lt;br&gt;present in the document before its being added to the index, but I
&lt;br&gt;need those field names un-edited during the analysis part.
&lt;br&gt;&amp;nbsp; &amp;nbsp;If it seems strange.. please don't mind.
&lt;br&gt;Thanks.
&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26695382&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26695382&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/question-related-to-Indexing-tp26695382p26695382.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26694922</id>
	<title>RE: TopFieldDocCollector and v3.0.0</title>
	<published>2009-12-08T06:40:24Z</published>
	<updated>2009-12-08T06:40:24Z</updated>
	<author>
		<name>Uwe Schindler</name>
	</author>
	<content type="html">The only difference to 3.0 is, that after moving to 3.0, you can remove lots
&lt;br&gt;of unsafe casts and use generics (which does not work in 2.9, as it is Java
&lt;br&gt;1.4 only). So this is the good thing when directly moving to 3.0.
&lt;br&gt;&lt;br&gt;But as the release notes for 3.0 denote, for new users that want to start
&lt;br&gt;new projects, 3.0 is the best start because they get a clean generified and
&lt;br&gt;type safe API (whichout old crap). For users porting from older versions,
&lt;br&gt;the move through 2.9.1 is recommended. After the move to 3.0, you can (but
&lt;br&gt;you must not) further update your code to use generics, which is not really
&lt;br&gt;needed but will remove all compiler warnings.
&lt;br&gt;&lt;br&gt;-----
&lt;br&gt;Uwe Schindler
&lt;br&gt;H.-H.-Meier-Allee 63, D-28213 Bremen
&lt;br&gt;&lt;a href=&quot;http://www.thetaphi.de&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.thetaphi.de&lt;/a&gt;&lt;br&gt;eMail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26694922&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;uwe@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; -----Original Message-----
&lt;br&gt;&amp;gt; From: Erick Erickson [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26694922&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;erickerickson@...&lt;/a&gt;]
&lt;br&gt;&amp;gt; Sent: Tuesday, December 08, 2009 2:24 PM
&lt;br&gt;&amp;gt; To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26694922&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user@...&lt;/a&gt;
&lt;br&gt;&amp;gt; Subject: Re: TopFieldDocCollector and v3.0.0
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; You might want to move to 2.9.1 first, find and fix all the deprecations
&lt;br&gt;&amp;gt; and *then* move to 3.x.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; It seems like more work, but it's actually not. Especially if you have
&lt;br&gt;&amp;gt; reasonable
&lt;br&gt;&amp;gt; unit tests. Since lots of effort has been put into maintaining backwards
&lt;br&gt;&amp;gt; compatibility in the 2.X versions, 2.9.1 should &amp;quot;just work&amp;quot; for you. Then
&lt;br&gt;&amp;gt; you can remove the deprecated methods a little bit at a time rather than
&lt;br&gt;&amp;gt; all at once. It's always tempting to do things in &amp;quot;one big edit&amp;quot;, but then
&lt;br&gt;&amp;gt; you
&lt;br&gt;&amp;gt; never know which one of the many changes actually broke something. Unless
&lt;br&gt;&amp;gt; you can code perfectly the first time, in which case I'd recommend we hire
&lt;br&gt;&amp;gt; you and pay you a gazillion dollars &amp;lt;G&amp;gt;....
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Once all the deprecations are removed from 2.9.1, you shouldn't have to do
&lt;br&gt;&amp;gt; anything to move to 3.x. So you get the best of both worlds....
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Best
&lt;br&gt;&amp;gt; Erick
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; On Tue, Dec 8, 2009 at 1:44 AM, Antony Bowesman &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26694922&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;adb@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; I'm on 2.3.2 and looking to move to 2.9.1 or 3.0.0
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; In 2.9.1 TopFieldDocCollector is
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;quot;Deprecated. Please use TopFieldCollector instead.&amp;quot;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; in 3.0.0 TopFieldCollector says
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; NOTE: This API is experimental and might change in incompatible ways in
&lt;br&gt;&amp;gt; the
&lt;br&gt;&amp;gt; &amp;gt; next release
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; What is the suggested path for migrating TopFieldDocCollector usage?
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Antony
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; &amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26694922&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26694922&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26694922&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26694922&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/TopFieldDocCollector-and-v3.0.0-tp26689404p26694922.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26694106</id>
	<title>Re: IndexDivisor</title>
	<published>2009-12-08T05:46:28Z</published>
	<updated>2009-12-08T05:46:28Z</updated>
	<author>
		<name>Michael McCandless-2</name>
	</author>
	<content type="html">Visiting all the index terms, which must be done for any divisor !=
&lt;br&gt;-1, generates a good amount of garbage. &amp;nbsp;So if you're including that
&lt;br&gt;garbage in your memory measurement, that would explain what you're
&lt;br&gt;seeing, and switching to a memory profiler should show the true RAM
&lt;br&gt;usage.
&lt;br&gt;&lt;br&gt;Mike
&lt;br&gt;&lt;br&gt;On Tue, Dec 8, 2009 at 6:29 AM, Ganesh &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26694106&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;emailgane@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Thanks Mike...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; As i explained before, I created a small app, which loads all the db, does term search (using term query) and calculates the memory consumption. I tried this with divisor value but after 100 there seems to be no difference.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Just load the database with different divisor value and then perform warming using TermQuery. I feel there should be some difference when opening with different value. But it didn't. I will try to perform the same using profiler.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Regards
&lt;br&gt;&amp;gt; Ganesh
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ----- Original Message -----
&lt;br&gt;&amp;gt; From: &amp;quot;Michael McCandless&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26694106&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lucene@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; To: &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26694106&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; Sent: Sunday, December 06, 2009 3:14 PM
&lt;br&gt;&amp;gt; Subject: Re: IndexDivisor
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; You really have to use a profiler, to trust the RAM measurements.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Certain queries, eg function queries, can load the field cache.  What
&lt;br&gt;&amp;gt; kind of queries are you running?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Mike
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Fri, Dec 4, 2009 at 9:11 AM, Ganesh &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26694106&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;emailgane@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; I didn't run with profiler. I created a test app and run that.. I am opening multiple database.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; IndexReader opened with IndexDivisor: 100 //Open the reader with the divisor value
&lt;br&gt;&amp;gt;&amp;gt; TermCount: 7046764 //Available unique terms in the db
&lt;br&gt;&amp;gt;&amp;gt; Warmup done: //warming up
&lt;br&gt;&amp;gt;&amp;gt; Memory: UsedMemory: 4 :FreeMemory:788 //Memory consumed after GC.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I couldn't see the memory difference for the value btw 100 to 10000. I will try to run with profiler and get back to you.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Other than terms what all the other things which consumes memory. There is no deletions, no norms and i am not doing sorting
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Regards
&lt;br&gt;&amp;gt;&amp;gt; Ganesh
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; ----- Original Message -----
&lt;br&gt;&amp;gt;&amp;gt; From: &amp;quot;Michael McCandless&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26694106&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lucene@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; To: &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26694106&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Sent: Friday, December 04, 2009 7:01 PM
&lt;br&gt;&amp;gt;&amp;gt; Subject: Re: IndexDivisor
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I'm confused -- what are these attachments? Output from a memory profiler?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Can you post the app you created?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Mike
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; On Fri, Dec 4, 2009 at 12:24 AM, Ganesh &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26694106&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;emailgane@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Thanks mike..
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Please find the attached file. I ran the testing for 1,100,1000,10000 divisor value. There is difference from 1 to 100 but there is no difference between 100 to 10000.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; I created a new application, in which i opened all reader and searcher and warmed up. Sleep for a minute and close all the searcher and reader.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; There is no deletions, no norms and i am not doing sorting.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Regards
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Ganesh
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; ----- Original Message -----
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; From: &amp;quot;Michael McCandless&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26694106&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lucene@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; To: &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26694106&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Sent: Thursday, December 03, 2009 9:35 PM
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Subject: Re: IndexDivisor
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Can you run w/ a memory profiler? I don't trust that gc is truly running.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Mike
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; On Thu, Dec 3, 2009 at 10:47 AM, Ganesh &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26694106&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;emailgane@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I am doing GC before calculating the memory. Even i set my indexdivisor to 10000 but there seems to be no change.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Below are my stats
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; IndexDivisor Memory
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; -1 7 MB
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 1 486 MB
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 100 180 MB
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 1000 176 MB.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 10000 176MB
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Regards
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Ganesh
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ----- Original Message -----
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; From: &amp;quot;Danil ŢORIN&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26694106&amp;i=10&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;torindan@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; To: &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26694106&amp;i=11&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Sent: Thursday, December 03, 2009 8:35 PM
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Subject: Re: IndexDivisor
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Run System.gc() exactly before measuring memory usage.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; On sun jvm it will FORCE gc (unless DisableExplicitGC is used).
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; On Thu, Dec 3, 2009 at 16:30, Ganesh &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26694106&amp;i=12&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;emailgane@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Thanks mike.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I am opening the reader and warming it up and then calculating the memory consumed.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; long usedMemory = runtime.totalMemory() - runtime.freeMemory();
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Regards
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Ganesh
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ----- Original Message -----
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; From: &amp;quot;Michael McCandless&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26694106&amp;i=13&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lucene@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; To: &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26694106&amp;i=14&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Sent: Thursday, December 03, 2009 6:22 PM
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Subject: Re: IndexDivisor
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; On Thu, Dec 3, 2009 at 7:15 AM, Ganesh &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26694106&amp;i=15&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;emailgane@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Below are my stats
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; IndexDivisor Memory
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; -1 7 MB
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 1 486 MB
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 100 180 MB
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 1000 176 MB.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Do you simply create the IndexWriter &amp; IndexReader, but do no
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; searching/indexing?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; How are you measuring RAM? You should use a RAM profiler (eg YourKit)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; to get the &amp;quot;real&amp;quot; usage, not counting garbage that's yet to be
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; collected.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; My guess is the shear process of Lucene scanning your terms index
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; creates lots of garbage and you're measuring the RAM consumed by that
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; garbage. The garbage should be harmless (it'll eventually get GCd &amp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; reused).
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 1. Whether term vector will consume RAM. I think it should only consume disk space.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; No RAM is consumed.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 2. By setting RAM buffer for IW, Does it will allocate memory Or based on the usage the memory will be allocated / increased.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Only a little RAM is allocated up front, I think. It's only as you
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; start indexing docs that the big RAM is really allocated. After a
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; flush the RAM is then reused (ie, not freed) for subsequent segments.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Mike
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26694106&amp;i=16&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26694106&amp;i=17&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Send instant messages to your online friends &lt;a href=&quot;http://in.messenger.yahoo.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://in.messenger.yahoo.com&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26694106&amp;i=18&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26694106&amp;i=19&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26694106&amp;i=20&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26694106&amp;i=21&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Send instant messages to your online friends &lt;a href=&quot;http://in.messenger.yahoo.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://in.messenger.yahoo.com&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26694106&amp;i=22&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26694106&amp;i=23&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26694106&amp;i=24&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26694106&amp;i=25&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26694106&amp;i=26&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26694106&amp;i=27&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26694106&amp;i=28&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26694106&amp;i=29&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Send instant messages to your online friends &lt;a href=&quot;http://in.messenger.yahoo.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://in.messenger.yahoo.com&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26694106&amp;i=30&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26694106&amp;i=31&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26694106&amp;i=32&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26694106&amp;i=33&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Send instant messages to your online friends &lt;a href=&quot;http://in.messenger.yahoo.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://in.messenger.yahoo.com&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26694106&amp;i=34&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26694106&amp;i=35&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26694106&amp;i=36&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26694106&amp;i=37&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/IndexDivisor-tp26537960p26694106.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26693882</id>
	<title>Re: IndexWriter creates multiple .cfs files</title>
	<published>2009-12-08T05:27:02Z</published>
	<updated>2009-12-08T05:27:02Z</updated>
	<author>
		<name>Erick Erickson</name>
	</author>
	<content type="html">If you're using reopen, be sure to close the old reader
&lt;br&gt;if the new one isn't identical, something like:
&lt;br&gt;&lt;br&gt;IndexReader new = r.reopen();
&lt;br&gt;&amp;nbsp;if (new != reader) {
&lt;br&gt;&amp;nbsp; &amp;nbsp;... &amp;nbsp; &amp;nbsp; // reader was reopened
&lt;br&gt;&amp;nbsp; &amp;nbsp;reader.close();
&lt;br&gt;&amp;nbsp;}
&lt;br&gt;&amp;nbsp;reader = new;
&lt;br&gt;&lt;br&gt;&lt;br&gt;Erick
&lt;br&gt;&lt;br&gt;&lt;br&gt;On Tue, Dec 8, 2009 at 6:13 AM, Cool The Breezer
&lt;br&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26693882&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;techcool.kumar@...&lt;/a&gt;&amp;gt;wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Thanks Mike for your timely suggestion. Somehow readers are not reopened
&lt;br&gt;&amp;gt; properly.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ----- Original Message ----
&lt;br&gt;&amp;gt; From: Michael McCandless &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26693882&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lucene@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26693882&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user@...&lt;/a&gt;
&lt;br&gt;&amp;gt; Sent: Tue, December 8, 2009 3:31:22 PM
&lt;br&gt;&amp;gt; Subject: Re: IndexWriter creates multiple .cfs files
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; IndexWriter takes care of merging the CFSs down, over time. &amp;nbsp;Have you
&lt;br&gt;&amp;gt; changed your mergeFactor? &amp;nbsp;It's odd to see 100s of CFSs.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Or maybe you're not closing the old reader on reopening a new one?
&lt;br&gt;&amp;gt; That would prevent deletion of the files.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Mike
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Tue, Dec 8, 2009 at 1:43 AM, Cool The Breezer
&lt;br&gt;&amp;gt; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26693882&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;techcool.kumar@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; &amp;gt; Thanks Jason for quick reply and suggestion. I am definitely going to
&lt;br&gt;&amp;gt; change directory implementation policy to have one .cfs file instead of
&lt;br&gt;&amp;gt; hundreds in one directory.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; regards,
&lt;br&gt;&amp;gt; &amp;gt; Ranjan
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; ----- Original Message ----
&lt;br&gt;&amp;gt; &amp;gt; From: Jason Rutherglen &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26693882&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jason.rutherglen@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26693882&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &amp;gt; Sent: Tue, December 8, 2009 12:00:59 PM
&lt;br&gt;&amp;gt; &amp;gt; Subject: Re: IndexWriter creates multiple .cfs files
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; RB,
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; That's expected behavior, each .cfs corresponds to all of a
&lt;br&gt;&amp;gt; &amp;gt; segment's files. You could write your own directory
&lt;br&gt;&amp;gt; &amp;gt; implementation that underneath writes to a single file. It's
&lt;br&gt;&amp;gt; &amp;gt; usually good to present what you're trying to accomplish (i.e.
&lt;br&gt;&amp;gt; &amp;gt; the why).
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Jason
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; On Mon, Dec 7, 2009 at 10:25 PM, Cool The Breezer
&lt;br&gt;&amp;gt; &amp;gt; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26693882&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;techcool.kumar@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Hello Group,
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I am continuously updating an index and at the same
&lt;br&gt;&amp;gt; time searcher also searches the index, which resulted in multiple .cfs files
&lt;br&gt;&amp;gt; for each commit by IndexWriter. I am not sure whether this is an expected
&lt;br&gt;&amp;gt; behavior or I need to merge each time after IndexWriter commits. In between
&lt;br&gt;&amp;gt; the writer's commit, I reopen the IndexReader but still .cfs files keep on
&lt;br&gt;&amp;gt; increasing. I would like to have one .cfs file which can be reopened
&lt;br&gt;&amp;gt; frequently by reader and at the same time progressive commit by writer. Is
&lt;br&gt;&amp;gt; it possible?
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; - RB
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26693882&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26693882&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; &amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26693882&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26693882&amp;i=10&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; &amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26693882&amp;i=11&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26693882&amp;i=12&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26693882&amp;i=13&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26693882&amp;i=14&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26693882&amp;i=15&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26693882&amp;i=16&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/IndexWriter-creates-multiple-.cfs-files-tp26689289p26693882.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26693847</id>
	<title>Re: TopFieldDocCollector and v3.0.0</title>
	<published>2009-12-08T05:24:21Z</published>
	<updated>2009-12-08T05:24:21Z</updated>
	<author>
		<name>Erick Erickson</name>
	</author>
	<content type="html">You might want to move to 2.9.1 first, find and fix all the deprecations
&lt;br&gt;and *then* move to 3.x.
&lt;br&gt;&lt;br&gt;It seems like more work, but it's actually not. Especially if you have
&lt;br&gt;reasonable
&lt;br&gt;unit tests. Since lots of effort has been put into maintaining backwards
&lt;br&gt;compatibility in the 2.X versions, 2.9.1 should &amp;quot;just work&amp;quot; for you. Then
&lt;br&gt;you can remove the deprecated methods a little bit at a time rather than
&lt;br&gt;all at once. It's always tempting to do things in &amp;quot;one big edit&amp;quot;, but then
&lt;br&gt;you
&lt;br&gt;never know which one of the many changes actually broke something. Unless
&lt;br&gt;you can code perfectly the first time, in which case I'd recommend we hire
&lt;br&gt;you and pay you a gazillion dollars &amp;lt;G&amp;gt;....
&lt;br&gt;&lt;br&gt;Once all the deprecations are removed from 2.9.1, you shouldn't have to do
&lt;br&gt;anything to move to 3.x. So you get the best of both worlds....
&lt;br&gt;&lt;br&gt;Best
&lt;br&gt;Erick
&lt;br&gt;&lt;br&gt;&lt;br&gt;On Tue, Dec 8, 2009 at 1:44 AM, Antony Bowesman &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26693847&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;adb@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; I'm on 2.3.2 and looking to move to 2.9.1 or 3.0.0
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; In 2.9.1 TopFieldDocCollector is
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;quot;Deprecated. Please use TopFieldCollector instead.&amp;quot;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; in 3.0.0 TopFieldCollector says
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; NOTE: This API is experimental and might change in incompatible ways in the
&lt;br&gt;&amp;gt; next release
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; What is the suggested path for migrating TopFieldDocCollector usage?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Antony
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26693847&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26693847&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/TopFieldDocCollector-and-v3.0.0-tp26689404p26693847.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26693318</id>
	<title>Re: org.apache.lucene.search.RemoteSearchable missing</title>
	<published>2009-12-08T04:39:03Z</published>
	<updated>2009-12-08T04:39:03Z</updated>
	<author>
		<name>Weiwei Wang-2</name>
	</author>
	<content type="html">Thanks, so many changes in 3.0.0
&lt;br&gt;&lt;br&gt;On Tue, Dec 8, 2009 at 8:32 PM, Mark Miller &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26693318&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;markrmiller@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Weiwei Wang wrote:
&lt;br&gt;&amp;gt; &amp;gt; Hi,all,
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; I can't not find this class in the downloaded jar and I can't figure
&lt;br&gt;&amp;gt; out
&lt;br&gt;&amp;gt; &amp;gt; what's wrong.
&lt;br&gt;&amp;gt; &amp;gt; Does anybody here know how to fix it?
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; Its now in the remote Contrib.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; - Mark
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.lucidimagination.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.lucidimagination.com&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26693318&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26693318&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Weiwei Wang
&lt;br&gt;Alex Wang
&lt;br&gt;王巍巍
&lt;br&gt;Room 403, Mengmin Wei Building
&lt;br&gt;Computer Science Department
&lt;br&gt;Gulou Campus of Nanjing University
&lt;br&gt;Nanjing, P.R.China, 210093
&lt;br&gt;&lt;br&gt;Homepage: &lt;a href=&quot;http://cs.nju.edu.cn/rl/weiweiwang&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://cs.nju.edu.cn/rl/weiweiwang&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/org.apache.lucene.search.RemoteSearchable-missing-tp26693231p26693318.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26693250</id>
	<title>Re: org.apache.lucene.search.RemoteSearchable missing</title>
	<published>2009-12-08T04:32:34Z</published>
	<updated>2009-12-08T04:32:34Z</updated>
	<author>
		<name>markrmiller</name>
	</author>
	<content type="html">Weiwei Wang wrote:
&lt;br&gt;&amp;gt; Hi,all,
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; I can't not find this class in the downloaded jar and I can't figure out
&lt;br&gt;&amp;gt; what's wrong.
&lt;br&gt;&amp;gt; Does anybody here know how to fix it?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;Its now in the remote Contrib.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;- Mark
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://www.lucidimagination.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.lucidimagination.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26693250&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26693250&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/org.apache.lucene.search.RemoteSearchable-missing-tp26693231p26693250.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26693231</id>
	<title>org.apache.lucene.search.RemoteSearchable missing</title>
	<published>2009-12-08T04:31:38Z</published>
	<updated>2009-12-08T04:31:38Z</updated>
	<author>
		<name>Weiwei Wang-2</name>
	</author>
	<content type="html">Hi,all,
&lt;br&gt;&amp;nbsp; &amp;nbsp; I can't not find this class in the downloaded jar and I can't figure out
&lt;br&gt;what's wrong.
&lt;br&gt;Does anybody here know how to fix it?
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Weiwei Wang
&lt;br&gt;Alex Wang
&lt;br&gt;王巍巍
&lt;br&gt;Room 403, Mengmin Wei Building
&lt;br&gt;Computer Science Department
&lt;br&gt;Gulou Campus of Nanjing University
&lt;br&gt;Nanjing, P.R.China, 210093
&lt;br&gt;&lt;br&gt;Homepage: &lt;a href=&quot;http://cs.nju.edu.cn/rl/weiweiwang&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://cs.nju.edu.cn/rl/weiweiwang&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/org.apache.lucene.search.RemoteSearchable-missing-tp26693231p26693231.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26692470</id>
	<title>Re: IndexDivisor</title>
	<published>2009-12-08T03:29:40Z</published>
	<updated>2009-12-08T03:29:40Z</updated>
	<author>
		<name>Ganesh - yahoo</name>
	</author>
	<content type="html">Thanks Mike...
&lt;br&gt;&lt;br&gt;As i explained before, I created a small app, which loads all the db, does term search (using term query) and calculates the memory consumption. I tried this with divisor value but after 100 there seems to be no difference.
&lt;br&gt;&lt;br&gt;Just load the database with different divisor value and then perform warming using TermQuery. I feel there should be some difference when opening with different value. But it didn't. I will try to perform the same using profiler.
&lt;br&gt;&lt;br&gt;Regards
&lt;br&gt;Ganesh 
&lt;br&gt;&lt;br&gt;&lt;br&gt;----- Original Message ----- 
&lt;br&gt;From: &amp;quot;Michael McCandless&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26692470&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lucene@...&lt;/a&gt;&amp;gt;
&lt;br&gt;To: &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26692470&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user@...&lt;/a&gt;&amp;gt;
&lt;br&gt;Sent: Sunday, December 06, 2009 3:14 PM
&lt;br&gt;Subject: Re: IndexDivisor
&lt;br&gt;&lt;br&gt;&lt;br&gt;You really have to use a profiler, to trust the RAM measurements.
&lt;br&gt;&lt;br&gt;Certain queries, eg function queries, can load the field cache. &amp;nbsp;What
&lt;br&gt;kind of queries are you running?
&lt;br&gt;&lt;br&gt;Mike
&lt;br&gt;&lt;br&gt;On Fri, Dec 4, 2009 at 9:11 AM, Ganesh &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26692470&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;emailgane@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; I didn't run with profiler. I created a test app and run that.. I am opening multiple database.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; IndexReader opened with IndexDivisor: 100 //Open the reader with the divisor value
&lt;br&gt;&amp;gt; TermCount: 7046764 //Available unique terms in the db
&lt;br&gt;&amp;gt; Warmup done: //warming up
&lt;br&gt;&amp;gt; Memory: UsedMemory: 4 :FreeMemory:788 //Memory consumed after GC.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I couldn't see the memory difference for the value btw 100 to 10000. I will try to run with profiler and get back to you.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Other than terms what all the other things which consumes memory. There is no deletions, no norms and i am not doing sorting
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Regards
&lt;br&gt;&amp;gt; Ganesh
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ----- Original Message -----
&lt;br&gt;&amp;gt; From: &amp;quot;Michael McCandless&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26692470&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lucene@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; To: &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26692470&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; Sent: Friday, December 04, 2009 7:01 PM
&lt;br&gt;&amp;gt; Subject: Re: IndexDivisor
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I'm confused -- what are these attachments? Output from a memory profiler?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Can you post the app you created?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Mike
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Fri, Dec 4, 2009 at 12:24 AM, Ganesh &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26692470&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;emailgane@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; Thanks mike..
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Please find the attached file. I ran the testing for 1,100,1000,10000 divisor value. There is difference from 1 to 100 but there is no difference between 100 to 10000.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I created a new application, in which i opened all reader and searcher and warmed up. Sleep for a minute and close all the searcher and reader.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; There is no deletions, no norms and i am not doing sorting.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Regards
&lt;br&gt;&amp;gt;&amp;gt; Ganesh
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; ----- Original Message -----
&lt;br&gt;&amp;gt;&amp;gt; From: &amp;quot;Michael McCandless&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26692470&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lucene@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; To: &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26692470&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Sent: Thursday, December 03, 2009 9:35 PM
&lt;br&gt;&amp;gt;&amp;gt; Subject: Re: IndexDivisor
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Can you run w/ a memory profiler? I don't trust that gc is truly running.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Mike
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; On Thu, Dec 3, 2009 at 10:47 AM, Ganesh &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26692470&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;emailgane@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; I am doing GC before calculating the memory. Even i set my indexdivisor to 10000 but there seems to be no change.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Below are my stats
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; IndexDivisor Memory
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; -1 7 MB
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; 1 486 MB
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; 100 180 MB
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; 1000 176 MB.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; 10000 176MB
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Regards
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Ganesh
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; ----- Original Message -----
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; From: &amp;quot;Danil ŢORIN&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26692470&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;torindan@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; To: &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26692470&amp;i=10&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Sent: Thursday, December 03, 2009 8:35 PM
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Subject: Re: IndexDivisor
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Run System.gc() exactly before measuring memory usage.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; On sun jvm it will FORCE gc (unless DisableExplicitGC is used).
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; On Thu, Dec 3, 2009 at 16:30, Ganesh &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26692470&amp;i=11&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;emailgane@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Thanks mike.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I am opening the reader and warming it up and then calculating the memory consumed.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; long usedMemory = runtime.totalMemory() - runtime.freeMemory();
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Regards
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Ganesh
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ----- Original Message -----
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; From: &amp;quot;Michael McCandless&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26692470&amp;i=12&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lucene@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; To: &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26692470&amp;i=13&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Sent: Thursday, December 03, 2009 6:22 PM
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Subject: Re: IndexDivisor
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; On Thu, Dec 3, 2009 at 7:15 AM, Ganesh &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26692470&amp;i=14&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;emailgane@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Below are my stats
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; IndexDivisor Memory
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; -1 7 MB
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 1 486 MB
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 100 180 MB
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 1000 176 MB.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Do you simply create the IndexWriter &amp; IndexReader, but do no
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; searching/indexing?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; How are you measuring RAM? You should use a RAM profiler (eg YourKit)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; to get the &amp;quot;real&amp;quot; usage, not counting garbage that's yet to be
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; collected.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; My guess is the shear process of Lucene scanning your terms index
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; creates lots of garbage and you're measuring the RAM consumed by that
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; garbage. The garbage should be harmless (it'll eventually get GCd &amp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; reused).
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 1. Whether term vector will consume RAM. I think it should only consume disk space.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; No RAM is consumed.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 2. By setting RAM buffer for IW, Does it will allocate memory Or based on the usage the memory will be allocated / increased.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Only a little RAM is allocated up front, I think. It's only as you
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; start indexing docs that the big RAM is really allocated. After a
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; flush the RAM is then reused (ie, not freed) for subsequent segments.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Mike
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26692470&amp;i=15&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26692470&amp;i=16&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Send instant messages to your online friends &lt;a href=&quot;http://in.messenger.yahoo.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://in.messenger.yahoo.com&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26692470&amp;i=17&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26692470&amp;i=18&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26692470&amp;i=19&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26692470&amp;i=20&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Send instant messages to your online friends &lt;a href=&quot;http://in.messenger.yahoo.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://in.messenger.yahoo.com&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26692470&amp;i=21&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26692470&amp;i=22&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26692470&amp;i=23&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26692470&amp;i=24&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26692470&amp;i=25&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26692470&amp;i=26&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26692470&amp;i=27&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26692470&amp;i=28&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Send instant messages to your online friends &lt;a href=&quot;http://in.messenger.yahoo.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://in.messenger.yahoo.com&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26692470&amp;i=29&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26692470&amp;i=30&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26692470&amp;i=31&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26692470&amp;i=32&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;Send instant messages to your online friends &lt;a href=&quot;http://in.messenger.yahoo.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://in.messenger.yahoo.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26692470&amp;i=33&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26692470&amp;i=34&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/IndexDivisor-tp26537960p26692470.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26692258</id>
	<title>Re: IndexWriter creates multiple .cfs files</title>
	<published>2009-12-08T03:13:48Z</published>
	<updated>2009-12-08T03:13:48Z</updated>
	<author>
		<name>JSF Help</name>
	</author>
	<content type="html">Thanks Mike for your timely suggestion. Somehow readers are not reopened properly. 
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;----- Original Message ----
&lt;br&gt;From: Michael McCandless &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26692258&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lucene@...&lt;/a&gt;&amp;gt;
&lt;br&gt;To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26692258&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user@...&lt;/a&gt;
&lt;br&gt;Sent: Tue, December 8, 2009 3:31:22 PM
&lt;br&gt;Subject: Re: IndexWriter creates multiple .cfs files
&lt;br&gt;&lt;br&gt;IndexWriter takes care of merging the CFSs down, over time. &amp;nbsp;Have you
&lt;br&gt;changed your mergeFactor? &amp;nbsp;It's odd to see 100s of CFSs.
&lt;br&gt;&lt;br&gt;Or maybe you're not closing the old reader on reopening a new one?
&lt;br&gt;That would prevent deletion of the files.
&lt;br&gt;&lt;br&gt;Mike
&lt;br&gt;&lt;br&gt;On Tue, Dec 8, 2009 at 1:43 AM, Cool The Breezer
&lt;br&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26692258&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;techcool.kumar@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Thanks Jason for quick reply and suggestion. I am definitely going to change directory implementation policy to have one .cfs file instead of hundreds in one directory.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; regards,
&lt;br&gt;&amp;gt; Ranjan
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ----- Original Message ----
&lt;br&gt;&amp;gt; From: Jason Rutherglen &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26692258&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jason.rutherglen@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26692258&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user@...&lt;/a&gt;
&lt;br&gt;&amp;gt; Sent: Tue, December 8, 2009 12:00:59 PM
&lt;br&gt;&amp;gt; Subject: Re: IndexWriter creates multiple .cfs files
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; RB,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; That's expected behavior, each .cfs corresponds to all of a
&lt;br&gt;&amp;gt; segment's files. You could write your own directory
&lt;br&gt;&amp;gt; implementation that underneath writes to a single file. It's
&lt;br&gt;&amp;gt; usually good to present what you're trying to accomplish (i.e.
&lt;br&gt;&amp;gt; the why).
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Jason
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Mon, Dec 7, 2009 at 10:25 PM, Cool The Breezer
&lt;br&gt;&amp;gt; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26692258&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;techcool.kumar@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; Hello Group,
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I am continuously updating an index and at the same time searcher also searches the index, which resulted in multiple .cfs files for each commit by IndexWriter. I am not sure whether this is an expected behavior or I need to merge each time after IndexWriter commits. In between the writer's commit, I reopen the IndexReader but still .cfs files keep on increasing. I would like to have one .cfs file which can be reopened frequently by reader and at the same time progressive commit by writer. Is it possible?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; - RB
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26692258&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26692258&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26692258&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26692258&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26692258&amp;i=10&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26692258&amp;i=11&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26692258&amp;i=12&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26692258&amp;i=13&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26692258&amp;i=14&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26692258&amp;i=15&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/IndexWriter-creates-multiple-.cfs-files-tp26689289p26692258.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26691905</id>
	<title>Re: heap memory issues when sorting by a string field</title>
	<published>2009-12-08T02:43:26Z</published>
	<updated>2009-12-08T02:43:26Z</updated>
	<author>
		<name>Michael McCandless-2</name>
	</author>
	<content type="html">I've opened LUCENE-2135.
&lt;br&gt;&lt;br&gt;Mike
&lt;br&gt;&lt;br&gt;On Tue, Dec 8, 2009 at 5:36 AM, Michael McCandless
&lt;br&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26691905&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lucene@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; This is a rather disturbing implementation detail of WeakHashMap, that
&lt;br&gt;&amp;gt; it needs the one extra step (invoking one of its methods) for its weak
&lt;br&gt;&amp;gt; keys to be reclaimable.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Maybe on IndexReader.close(), Lucene should go and evict all entries
&lt;br&gt;&amp;gt; in the FieldCache associated with that reader.  Ie, step through the
&lt;br&gt;&amp;gt; sub-readers, and if they are truly closed as well (not shared w/ other
&lt;br&gt;&amp;gt; readers), evict.  I'll open an issue.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Even in TCK's code fragment, it's not until the final line is done
&lt;br&gt;&amp;gt; executing, that the cache key even loses all hard references, because
&lt;br&gt;&amp;gt; it's that line that assigns to sSearcher, replacing the strong
&lt;br&gt;&amp;gt; reference to the old searcher.  Inserting sSearcher = null prior to
&lt;br&gt;&amp;gt; that would drop the hard reference sooner, but because of this impl
&lt;br&gt;&amp;gt; detail of WeakHashMap, something would still have to touch it (eg, a
&lt;br&gt;&amp;gt; warmup query that hits the field cache) before it's reclaimable.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Mike
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Mon, Dec 7, 2009 at 7:38 PM, Tom Hill &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26691905&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;solr-list@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; Hi -
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; If I understand correctly, WeakHashMap does not free the memory for the
&lt;br&gt;&amp;gt;&amp;gt; value (cached data) when the key is nulled, or even when the key is garbage
&lt;br&gt;&amp;gt;&amp;gt; collected.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; It requires one more step: a method on WeakHashMap must be called to allow
&lt;br&gt;&amp;gt;&amp;gt; it to release its hard reference to the cached data. It appears that most
&lt;br&gt;&amp;gt;&amp;gt; methods in WeakHashMap end up calling expungeStaleEntries, which will clear
&lt;br&gt;&amp;gt;&amp;gt; the hard reference. But you have to call some method on the map, before the
&lt;br&gt;&amp;gt;&amp;gt; memory is eligible for garbage collection.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; So it requires four stages to free the cached data. Null the key; A GC to
&lt;br&gt;&amp;gt;&amp;gt; release the weak reference to the key; A call to some method on the map;
&lt;br&gt;&amp;gt;&amp;gt; Then the next GC cycle should free the value.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; So it seems possible that you could end up with double memory usage for a
&lt;br&gt;&amp;gt;&amp;gt; time. If you don't have a GC between the time that you close the old reader,
&lt;br&gt;&amp;gt;&amp;gt; and you start to load the field cache entry for the next reader, then the
&lt;br&gt;&amp;gt;&amp;gt; key may still be hanging around uncollected.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; At that point, it may run a GC when you allocate the new cache, but that's
&lt;br&gt;&amp;gt;&amp;gt; only the first GC. It can't free the cached data until after the next call
&lt;br&gt;&amp;gt;&amp;gt; to expungeStaleEntries, so for a while you have both caches around.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; This extra usage could cause things to move into tenured space. Could this
&lt;br&gt;&amp;gt;&amp;gt; be causing your problem?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Workaround would be to cause some method to be called on the WeakHashMap.
&lt;br&gt;&amp;gt;&amp;gt; You don't want to call get(), since that will try to populate the cache.
&lt;br&gt;&amp;gt;&amp;gt; Maybe if you tried putting a small value to the cache, and doing a GC, and
&lt;br&gt;&amp;gt;&amp;gt; see if your memory drops then.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Tom
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; On Mon, Dec 7, 2009 at 1:48 PM, TCK &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26691905&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;moonwatcher32329@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Thanks for the response. But I'm definitely calling close() on the old
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; reader and opening a new one (not using reopen). Also, to simplify the
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; analysis, I did my test with a single-threaded requester to eliminate any
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; concurrency issues.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; I'm doing:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; sSearcher.getIndexReader().close();
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; sSearcher.close(); // this actually seems to be a no-op
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; IndexReader newIndexReader = IndexReader.open(newDirectory);
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; sSearcher = new IndexSearcher(newIndexReader);
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Btw, isn't it bad practice anyway to have an unbounded cache? Are there any
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; plans to replace the HashMaps used for the innerCaches with an actual
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; size-bounded cache with some eviction policy (perhaps EhCache or something)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; ?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Thanks again,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; TCK
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; On Mon, Dec 7, 2009 at 4:37 PM, Erick Erickson &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26691905&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;erickerickson@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; What this sounds like is that you're not really closing your
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; readers even though you think you are. Sorting indeed uses up
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; significant memory when it populates internal caches and keeps
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; it around for later use (which is one of the reasons that warming
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; queries matter). But if you really do close the reader, I'm pretty
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; sure the memory should be GC-able.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; One thing that trips people up is IndexReader.reopen(). If it
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; returns a reader different than the original, you *must* close the
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; old one. If you don't, the old reader is still hanging around and
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; memory won't be returne.... An example from the Javadocs...
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;  IndexReader reader = ...
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;  ...
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;  IndexReader new = r.reopen();
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;  if (new != reader) {
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;   ...     // reader was reopened
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;   reader.close();
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;  }
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;  reader = new;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;  ...
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; If this is irrelevant, could you post your close/open
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; code?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; HTH
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; Erick
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; On Mon, Dec 7, 2009 at 4:27 PM, TCK &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26691905&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;moonwatcher32329@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; Hi,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; I'm having heap memory issues when I do lucene queries involving
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; sorting
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; by
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; a string field. Such queries seem to load a lot of data in to the heap.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; Moreover lucene seems to hold on to references to this data even after
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; the
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; index reader has been closed and a full GC has been run. Some of the
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; consequences of this are that in my generational heap configuration a
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; lot
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; of
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; memory gets promoted to tenured space each time I close the old index
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; reader
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; and after opening and querying using a new one, and the tenured space
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; eventually gets fragmented causing a lot of promotion failures
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; resulting
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; in
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; jvm hangs while the jvm does stop-the-world GCs.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; Does anyone know any workarounds to avoid these memory issues when
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; doing
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; such lucene queries?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; My profiling showed that even after a full GC lucene is holding on to a
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; lot
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; of references to field value data notably via the
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; FieldCacheImpl/ExtendedFieldCacheImpl. I noticed that the WeakHashMap
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; readerCaches are using unbounded HashMaps as the innerCaches and I used
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; reflection to replace these innerCaches with dummy empty HashMaps, but
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; still
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; I'm seeing the same behavior. I wondered if anyone has gone through
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; these
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; same issues before and would offer any advice.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; Thanks a lot,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; TCK
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26691905&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26691905&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/heap-memory-issues-when-sorting-by-a-string-field-tp26684470p26691905.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26691823</id>
	<title>Re: heap memory issues when sorting by a string field</title>
	<published>2009-12-08T02:36:24Z</published>
	<updated>2009-12-08T02:36:24Z</updated>
	<author>
		<name>Michael McCandless-2</name>
	</author>
	<content type="html">This is a rather disturbing implementation detail of WeakHashMap, that
&lt;br&gt;it needs the one extra step (invoking one of its methods) for its weak
&lt;br&gt;keys to be reclaimable.
&lt;br&gt;&lt;br&gt;Maybe on IndexReader.close(), Lucene should go and evict all entries
&lt;br&gt;in the FieldCache associated with that reader. &amp;nbsp;Ie, step through the
&lt;br&gt;sub-readers, and if they are truly closed as well (not shared w/ other
&lt;br&gt;readers), evict. &amp;nbsp;I'll open an issue.
&lt;br&gt;&lt;br&gt;Even in TCK's code fragment, it's not until the final line is done
&lt;br&gt;executing, that the cache key even loses all hard references, because
&lt;br&gt;it's that line that assigns to sSearcher, replacing the strong
&lt;br&gt;reference to the old searcher. &amp;nbsp;Inserting sSearcher = null prior to
&lt;br&gt;that would drop the hard reference sooner, but because of this impl
&lt;br&gt;detail of WeakHashMap, something would still have to touch it (eg, a
&lt;br&gt;warmup query that hits the field cache) before it's reclaimable.
&lt;br&gt;&lt;br&gt;Mike
&lt;br&gt;&lt;br&gt;On Mon, Dec 7, 2009 at 7:38 PM, Tom Hill &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26691823&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;solr-list@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi -
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; If I understand correctly, WeakHashMap does not free the memory for the
&lt;br&gt;&amp;gt; value (cached data) when the key is nulled, or even when the key is garbage
&lt;br&gt;&amp;gt; collected.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; It requires one more step: a method on WeakHashMap must be called to allow
&lt;br&gt;&amp;gt; it to release its hard reference to the cached data. It appears that most
&lt;br&gt;&amp;gt; methods in WeakHashMap end up calling expungeStaleEntries, which will clear
&lt;br&gt;&amp;gt; the hard reference. But you have to call some method on the map, before the
&lt;br&gt;&amp;gt; memory is eligible for garbage collection.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; So it requires four stages to free the cached data. Null the key; A GC to
&lt;br&gt;&amp;gt; release the weak reference to the key; A call to some method on the map;
&lt;br&gt;&amp;gt; Then the next GC cycle should free the value.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; So it seems possible that you could end up with double memory usage for a
&lt;br&gt;&amp;gt; time. If you don't have a GC between the time that you close the old reader,
&lt;br&gt;&amp;gt; and you start to load the field cache entry for the next reader, then the
&lt;br&gt;&amp;gt; key may still be hanging around uncollected.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; At that point, it may run a GC when you allocate the new cache, but that's
&lt;br&gt;&amp;gt; only the first GC. It can't free the cached data until after the next call
&lt;br&gt;&amp;gt; to expungeStaleEntries, so for a while you have both caches around.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; This extra usage could cause things to move into tenured space. Could this
&lt;br&gt;&amp;gt; be causing your problem?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Workaround would be to cause some method to be called on the WeakHashMap.
&lt;br&gt;&amp;gt; You don't want to call get(), since that will try to populate the cache.
&lt;br&gt;&amp;gt; Maybe if you tried putting a small value to the cache, and doing a GC, and
&lt;br&gt;&amp;gt; see if your memory drops then.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Tom
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Mon, Dec 7, 2009 at 1:48 PM, TCK &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26691823&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;moonwatcher32329@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Thanks for the response. But I'm definitely calling close() on the old
&lt;br&gt;&amp;gt;&amp;gt; reader and opening a new one (not using reopen). Also, to simplify the
&lt;br&gt;&amp;gt;&amp;gt; analysis, I did my test with a single-threaded requester to eliminate any
&lt;br&gt;&amp;gt;&amp;gt; concurrency issues.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I'm doing:
&lt;br&gt;&amp;gt;&amp;gt; sSearcher.getIndexReader().close();
&lt;br&gt;&amp;gt;&amp;gt; sSearcher.close(); // this actually seems to be a no-op
&lt;br&gt;&amp;gt;&amp;gt; IndexReader newIndexReader = IndexReader.open(newDirectory);
&lt;br&gt;&amp;gt;&amp;gt; sSearcher = new IndexSearcher(newIndexReader);
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Btw, isn't it bad practice anyway to have an unbounded cache? Are there any
&lt;br&gt;&amp;gt;&amp;gt; plans to replace the HashMaps used for the innerCaches with an actual
&lt;br&gt;&amp;gt;&amp;gt; size-bounded cache with some eviction policy (perhaps EhCache or something)
&lt;br&gt;&amp;gt;&amp;gt; ?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Thanks again,
&lt;br&gt;&amp;gt;&amp;gt; TCK
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; On Mon, Dec 7, 2009 at 4:37 PM, Erick Erickson &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26691823&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;erickerickson@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; What this sounds like is that you're not really closing your
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; readers even though you think you are. Sorting indeed uses up
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; significant memory when it populates internal caches and keeps
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; it around for later use (which is one of the reasons that warming
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; queries matter). But if you really do close the reader, I'm pretty
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; sure the memory should be GC-able.
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; One thing that trips people up is IndexReader.reopen(). If it
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; returns a reader different than the original, you *must* close the
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; old one. If you don't, the old reader is still hanging around and
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; memory won't be returne.... An example from the Javadocs...
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;  IndexReader reader = ...
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;  ...
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;  IndexReader new = r.reopen();
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;  if (new != reader) {
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;   ...     // reader was reopened
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;   reader.close();
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;  }
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;  reader = new;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;  ...
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; If this is irrelevant, could you post your close/open
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; code?
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; HTH
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; Erick
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; On Mon, Dec 7, 2009 at 4:27 PM, TCK &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26691823&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;moonwatcher32329@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; Hi,
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; I'm having heap memory issues when I do lucene queries involving
&lt;br&gt;&amp;gt;&amp;gt; sorting
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; by
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; a string field. Such queries seem to load a lot of data in to the heap.
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; Moreover lucene seems to hold on to references to this data even after
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; the
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; index reader has been closed and a full GC has been run. Some of the
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; consequences of this are that in my generational heap configuration a
&lt;br&gt;&amp;gt;&amp;gt; lot
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; of
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; memory gets promoted to tenured space each time I close the old index
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; reader
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; and after opening and querying using a new one, and the tenured space
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; eventually gets fragmented causing a lot of promotion failures
&lt;br&gt;&amp;gt;&amp;gt; resulting
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; in
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; jvm hangs while the jvm does stop-the-world GCs.
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; Does anyone know any workarounds to avoid these memory issues when
&lt;br&gt;&amp;gt;&amp;gt; doing
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; such lucene queries?
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; My profiling showed that even after a full GC lucene is holding on to a
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; lot
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; of references to field value data notably via the
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; FieldCacheImpl/ExtendedFieldCacheImpl. I noticed that the WeakHashMap
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; readerCaches are using unbounded HashMaps as the innerCaches and I used
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; reflection to replace these innerCaches with dummy empty HashMaps, but
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; still
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; I'm seeing the same behavior. I wondered if anyone has gone through
&lt;br&gt;&amp;gt;&amp;gt; these
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; same issues before and would offer any advice.
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; Thanks a lot,
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; TCK
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26691823&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26691823&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/heap-memory-issues-when-sorting-by-a-string-field-tp26684470p26691823.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26691344</id>
	<title>Re: IndexWriter creates multiple .cfs files</title>
	<published>2009-12-08T02:01:22Z</published>
	<updated>2009-12-08T02:01:22Z</updated>
	<author>
		<name>Michael McCandless-2</name>
	</author>
	<content type="html">IndexWriter takes care of merging the CFSs down, over time. &amp;nbsp;Have you
&lt;br&gt;changed your mergeFactor? &amp;nbsp;It's odd to see 100s of CFSs.
&lt;br&gt;&lt;br&gt;Or maybe you're not closing the old reader on reopening a new one?
&lt;br&gt;That would prevent deletion of the files.
&lt;br&gt;&lt;br&gt;Mike
&lt;br&gt;&lt;br&gt;On Tue, Dec 8, 2009 at 1:43 AM, Cool The Breezer
&lt;br&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26691344&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;techcool.kumar@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Thanks Jason for quick reply and suggestion. I am definitely going to change directory implementation policy to have one .cfs file instead of hundreds in one directory.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; regards,
&lt;br&gt;&amp;gt; Ranjan
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ----- Original Message ----
&lt;br&gt;&amp;gt; From: Jason Rutherglen &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26691344&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jason.rutherglen@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26691344&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user@...&lt;/a&gt;
&lt;br&gt;&amp;gt; Sent: Tue, December 8, 2009 12:00:59 PM
&lt;br&gt;&amp;gt; Subject: Re: IndexWriter creates multiple .cfs files
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; RB,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; That's expected behavior, each .cfs corresponds to all of a
&lt;br&gt;&amp;gt; segment's files. You could write your own directory
&lt;br&gt;&amp;gt; implementation that underneath writes to a single file. It's
&lt;br&gt;&amp;gt; usually good to present what you're trying to accomplish (i.e.
&lt;br&gt;&amp;gt; the why).
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Jason
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Mon, Dec 7, 2009 at 10:25 PM, Cool The Breezer
&lt;br&gt;&amp;gt; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26691344&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;techcool.kumar@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; Hello Group,
&lt;br&gt;&amp;gt;&amp;gt;                  I am continuously updating an index and at the same time searcher also searches the index, which resulted in multiple .cfs files for each commit by IndexWriter. I am not sure whether this is an expected behavior or I need to merge each time after IndexWriter commits. In between the writer's commit, I reopen the IndexReader but still .cfs files keep on increasing. I would like to have one .cfs file which can be reopened frequently by reader and at the same time progressive commit by writer. Is it possible?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; - RB
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26691344&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26691344&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26691344&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26691344&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26691344&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26691344&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26691344&amp;i=10&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26691344&amp;i=11&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/IndexWriter-creates-multiple-.cfs-files-tp26689289p26691344.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26689847</id>
	<title>RE: TopFieldDocCollector and v3.0.0</title>
	<published>2009-12-07T23:39:56Z</published>
	<updated>2009-12-07T23:39:56Z</updated>
	<author>
		<name>Uwe Schindler</name>
	</author>
	<content type="html">That's a java docs issue and already fixed for the 3.0 branch. You have to
&lt;br&gt;use the no longer experimental API.
&lt;br&gt;&lt;br&gt;Any by the way: Experimental means not &amp;quot;bad&amp;quot; or &amp;quot;functionally unstable&amp;quot;, it
&lt;br&gt;just means that the API might change on later releases.
&lt;br&gt;&lt;br&gt;-----
&lt;br&gt;Uwe Schindler
&lt;br&gt;H.-H.-Meier-Allee 63, D-28213 Bremen
&lt;br&gt;&lt;a href=&quot;http://www.thetaphi.de&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.thetaphi.de&lt;/a&gt;&lt;br&gt;eMail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26689847&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;uwe@...&lt;/a&gt;
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; -----Original Message-----
&lt;br&gt;&amp;gt; From: Antony Bowesman [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26689847&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;adb@...&lt;/a&gt;]
&lt;br&gt;&amp;gt; Sent: Tuesday, December 08, 2009 7:44 AM
&lt;br&gt;&amp;gt; To: Lucene User
&lt;br&gt;&amp;gt; Subject: TopFieldDocCollector and v3.0.0
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I'm on 2.3.2 and looking to move to 2.9.1 or 3.0.0
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; In 2.9.1 TopFieldDocCollector is
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;quot;Deprecated. Please use TopFieldCollector instead.&amp;quot;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; in 3.0.0 TopFieldCollector says
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; NOTE: This API is experimental and might change in incompatible ways in
&lt;br&gt;&amp;gt; the next
&lt;br&gt;&amp;gt; release
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; What is the suggested path for migrating TopFieldDocCollector usage?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Antony
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26689847&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26689847&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26689847&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26689847&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/TopFieldDocCollector-and-v3.0.0-tp26689404p26689847.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26689455</id>
	<title>Re: heap memory issues when sorting by a string field</title>
	<published>2009-12-07T22:51:46Z</published>
	<updated>2009-12-07T22:51:46Z</updated>
	<author>
		<name>Jason Rutherglen-2</name>
	</author>
	<content type="html">TCK,
&lt;br&gt;&lt;br&gt;CSIndexInput is returned by SegmentReader.getFieldCacheKey()
&lt;br&gt;&lt;br&gt;If you think it's an issue, then it'd be good to open an issue and submit
&lt;br&gt;some code as a patch, maybe a test case showing the WHM isn't
&lt;br&gt;removing values like it's supposed to.
&lt;br&gt;&lt;br&gt;Jason
&lt;br&gt;&lt;br&gt;On Mon, Dec 7, 2009 at 10:45 PM, TCK &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26689455&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;moonwatcher32329@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Thanks for the feedback guys. The evidence I have collected does point to an
&lt;br&gt;&amp;gt; issue either in the java WeakHashMap implementation or in Lucene's use of
&lt;br&gt;&amp;gt; it. In particular, I used reflection to replace the WeakHashMap instances
&lt;br&gt;&amp;gt; with my own dummy Map that does a no-op for the put operation, and although
&lt;br&gt;&amp;gt; this caused tons more garbage to be created for each search query the CMS
&lt;br&gt;&amp;gt; executions always collected that garbage and brought down the tenured space
&lt;br&gt;&amp;gt; usage to a small value.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Before that, I tried calling clear() on the WeakHashMap instances and then
&lt;br&gt;&amp;gt; calling size() which calls expungeStaleEntries() but that didn't help. There
&lt;br&gt;&amp;gt; may be indeed be a case of double memory usage for a while (until enough CMS
&lt;br&gt;&amp;gt; executions have run) as Tom pointed out, but I don't fully understand what's
&lt;br&gt;&amp;gt; happenning yet.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Also, bizzarely during my introspection of the readerCache WeakHashMap
&lt;br&gt;&amp;gt; instances I found an instance of
&lt;br&gt;&amp;gt; org.apache.lucene.index.CompoundFileReader$CSIndexInput as a key. Looking at
&lt;br&gt;&amp;gt; the code I don't see how anything other than an IndexReader could possibly
&lt;br&gt;&amp;gt; get there, and this class certainly doesn't extend IndexReader. Any ideas?
&lt;br&gt;&amp;gt; :-) Maybe I need to get more sleep.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Btw, is searching with a sort by a text field not a common use-case of
&lt;br&gt;&amp;gt; lucene? I've been testing with only 1Gb indexes and I'm pretty sure there
&lt;br&gt;&amp;gt; are much larger indexes out there.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Cheers,
&lt;br&gt;&amp;gt; TCK
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Mon, Dec 7, 2009 at 7:57 PM, Tom Hill &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26689455&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;solr-list@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Hey, that's a nice little Class! I hadn't see it before. But it sounds like
&lt;br&gt;&amp;gt;&amp;gt; the asynchronous cleanup might deal with the problem I mentioned above (but
&lt;br&gt;&amp;gt;&amp;gt; I haven't looked at the code yet).
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; It's an apache license - but you mentioned something about no third party
&lt;br&gt;&amp;gt;&amp;gt; libraries. Is that a policy for Lucene?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Tom
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; On Mon, Dec 7, 2009 at 4:44 PM, Jason Rutherglen &amp;lt;
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26689455&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jason.rutherglen@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; I wonder if Google Collections (even though we don't use third party
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; libraries) concurrent map, which supports weak keys, handles the
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; removal of weakly referenced keys in a more elegant way than Java's
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; WeakHashMap?
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; On Mon, Dec 7, 2009 at 4:38 PM, Tom Hill &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26689455&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;solr-list@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; Hi -
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; If I understand correctly, WeakHashMap does not free the memory for the
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; value (cached data) when the key is nulled, or even when the key is
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; garbage
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; collected.
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; It requires one more step: a method on WeakHashMap must be called to
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; allow
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; it to release its hard reference to the cached data. It appears that
&lt;br&gt;&amp;gt;&amp;gt; most
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; methods in WeakHashMap end up calling expungeStaleEntries, which will
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; clear
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; the hard reference. But you have to call some method on the map, before
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; the
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; memory is eligible for garbage collection.
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; So it requires four stages to free the cached data. Null the key; A GC
&lt;br&gt;&amp;gt;&amp;gt; to
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; release the weak reference to the key; A call to some method on the
&lt;br&gt;&amp;gt;&amp;gt; map;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; Then the next GC cycle should free the value.
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; So it seems possible that you could end up with double memory usage for
&lt;br&gt;&amp;gt;&amp;gt; a
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; time. If you don't have a GC between the time that you close the old
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; reader,
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; and you start to load the field cache entry for the next reader, then
&lt;br&gt;&amp;gt;&amp;gt; the
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; key may still be hanging around uncollected.
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; At that point, it may run a GC when you allocate the new cache, but
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; that's
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; only the first GC. It can't free the cached data until after the next
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; call
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; to expungeStaleEntries, so for a while you have both caches around.
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; This extra usage could cause things to move into tenured space. Could
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; this
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; be causing your problem?
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; Workaround would be to cause some method to be called on the
&lt;br&gt;&amp;gt;&amp;gt; WeakHashMap.
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; You don't want to call get(), since that will try to populate the
&lt;br&gt;&amp;gt;&amp;gt; cache.
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; Maybe if you tried putting a small value to the cache, and doing a GC,
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; and
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; see if your memory drops then.
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; Tom
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; On Mon, Dec 7, 2009 at 1:48 PM, TCK &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26689455&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;moonwatcher32329@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; Thanks for the response. But I'm definitely calling close() on the old
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; reader and opening a new one (not using reopen). Also, to simplify the
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; analysis, I did my test with a single-threaded requester to eliminate
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; any
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; concurrency issues.
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; I'm doing:
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; sSearcher.getIndexReader().close();
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; sSearcher.close(); // this actually seems to be a no-op
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; IndexReader newIndexReader = IndexReader.open(newDirectory);
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; sSearcher = new IndexSearcher(newIndexReader);
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; Btw, isn't it bad practice anyway to have an unbounded cache? Are
&lt;br&gt;&amp;gt;&amp;gt; there
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; any
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; plans to replace the HashMaps used for the innerCaches with an actual
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; size-bounded cache with some eviction policy (perhaps EhCache or
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; something)
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; ?
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; Thanks again,
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; TCK
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; On Mon, Dec 7, 2009 at 4:37 PM, Erick Erickson &amp;lt;
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26689455&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;erickerickson@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt;wrote:
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; What this sounds like is that you're not really closing your
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; readers even though you think you are. Sorting indeed uses up
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; significant memory when it populates internal caches and keeps
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; it around for later use (which is one of the reasons that warming
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; queries matter). But if you really do close the reader, I'm pretty
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; sure the memory should be GC-able.
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; One thing that trips people up is IndexReader.reopen(). If it
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; returns a reader different than the original, you *must* close the
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; old one. If you don't, the old reader is still hanging around and
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; memory won't be returne.... An example from the Javadocs...
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt;  IndexReader reader = ...
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt;  ...
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt;  IndexReader new = r.reopen();
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt;  if (new != reader) {
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt;   ...     // reader was reopened
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt;   reader.close();
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt;  }
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt;  reader = new;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt;  ...
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; If this is irrelevant, could you post your close/open
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; code?
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; HTH
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; Erick
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; On Mon, Dec 7, 2009 at 4:27 PM, TCK &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26689455&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;moonwatcher32329@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; Hi,
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; I'm having heap memory issues when I do lucene queries involving
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; sorting
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; by
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; a string field. Such queries seem to load a lot of data in to the
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; heap.
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; Moreover lucene seems to hold on to references to this data even
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; after
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; the
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; index reader has been closed and a full GC has been run. Some of
&lt;br&gt;&amp;gt;&amp;gt; the
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; consequences of this are that in my generational heap
&lt;br&gt;&amp;gt;&amp;gt; configuration
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; a
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; lot
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; of
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; memory gets promoted to tenured space each time I close the old
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; index
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; reader
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; and after opening and querying using a new one, and the tenured
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; space
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; eventually gets fragmented causing a lot of promotion failures
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; resulting
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; in
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; jvm hangs while the jvm does stop-the-world GCs.
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; Does anyone know any workarounds to avoid these memory issues when
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; doing
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; such lucene queries?
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; My profiling showed that even after a full GC lucene is holding on
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; to a
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; lot
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; of references to field value data notably via the
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; FieldCacheImpl/ExtendedFieldCacheImpl. I noticed that the
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; WeakHashMap
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; readerCaches are using unbounded HashMaps as the innerCaches and I
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; used
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; reflection to replace these innerCaches with dummy empty HashMaps,
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; but
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; still
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; I'm seeing the same behavior. I wondered if anyone has gone
&lt;br&gt;&amp;gt;&amp;gt; through
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; these
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; same issues before and would offer any advice.
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; Thanks a lot,
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; TCK
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26689455&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26689455&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26689455&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26689455&amp;i=10&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/heap-memory-issues-when-sorting-by-a-string-field-tp26684470p26689455.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26689424</id>
	<title>Re: heap memory issues when sorting by a string field</title>
	<published>2009-12-07T22:48:25Z</published>
	<updated>2009-12-07T22:48:25Z</updated>
	<author>
		<name>Jason Rutherglen-2</name>
	</author>
	<content type="html">&amp;gt; It's an apache license - but you mentioned something about no third party
&lt;br&gt;&amp;gt; libraries. Is that a policy for Lucene?
&lt;br&gt;&lt;br&gt;Pretty much... &amp;nbsp;Though one can always submit a patch anyways.
&lt;br&gt;&lt;br&gt;On Mon, Dec 7, 2009 at 4:57 PM, Tom Hill &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26689424&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;solr-list@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hey, that's a nice little Class! I hadn't see it before. But it sounds like
&lt;br&gt;&amp;gt; the asynchronous cleanup might deal with the problem I mentioned above (but
&lt;br&gt;&amp;gt; I haven't looked at the code yet).
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; It's an apache license - but you mentioned something about no third party
&lt;br&gt;&amp;gt; libraries. Is that a policy for Lucene?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Tom
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Mon, Dec 7, 2009 at 4:44 PM, Jason Rutherglen &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26689424&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jason.rutherglen@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I wonder if Google Collections (even though we don't use third party
&lt;br&gt;&amp;gt;&amp;gt; libraries) concurrent map, which supports weak keys, handles the
&lt;br&gt;&amp;gt;&amp;gt; removal of weakly referenced keys in a more elegant way than Java's
&lt;br&gt;&amp;gt;&amp;gt; WeakHashMap?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; On Mon, Dec 7, 2009 at 4:38 PM, Tom Hill &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26689424&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;solr-list@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; Hi -
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; If I understand correctly, WeakHashMap does not free the memory for the
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; value (cached data) when the key is nulled, or even when the key is
&lt;br&gt;&amp;gt;&amp;gt; garbage
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; collected.
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; It requires one more step: a method on WeakHashMap must be called to
&lt;br&gt;&amp;gt;&amp;gt; allow
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; it to release its hard reference to the cached data. It appears that most
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; methods in WeakHashMap end up calling expungeStaleEntries, which will
&lt;br&gt;&amp;gt;&amp;gt; clear
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; the hard reference. But you have to call some method on the map, before
&lt;br&gt;&amp;gt;&amp;gt; the
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; memory is eligible for garbage collection.
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; So it requires four stages to free the cached data. Null the key; A GC to
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; release the weak reference to the key; A call to some method on the map;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; Then the next GC cycle should free the value.
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; So it seems possible that you could end up with double memory usage for a
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; time. If you don't have a GC between the time that you close the old
&lt;br&gt;&amp;gt;&amp;gt; reader,
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; and you start to load the field cache entry for the next reader, then the
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; key may still be hanging around uncollected.
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; At that point, it may run a GC when you allocate the new cache, but
&lt;br&gt;&amp;gt;&amp;gt; that's
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; only the first GC. It can't free the cached data until after the next
&lt;br&gt;&amp;gt;&amp;gt; call
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; to expungeStaleEntries, so for a while you have both caches around.
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; This extra usage could cause things to move into tenured space. Could
&lt;br&gt;&amp;gt;&amp;gt; this
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; be causing your problem?
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; Workaround would be to cause some method to be called on the WeakHashMap.
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; You don't want to call get(), since that will try to populate the cache.
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; Maybe if you tried putting a small value to the cache, and doing a GC,
&lt;br&gt;&amp;gt;&amp;gt; and
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; see if your memory drops then.
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; Tom
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; On Mon, Dec 7, 2009 at 1:48 PM, TCK &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26689424&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;moonwatcher32329@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; Thanks for the response. But I'm definitely calling close() on the old
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; reader and opening a new one (not using reopen). Also, to simplify the
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; analysis, I did my test with a single-threaded requester to eliminate
&lt;br&gt;&amp;gt;&amp;gt; any
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; concurrency issues.
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; I'm doing:
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; sSearcher.getIndexReader().close();
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; sSearcher.close(); // this actually seems to be a no-op
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; IndexReader newIndexReader = IndexReader.open(newDirectory);
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; sSearcher = new IndexSearcher(newIndexReader);
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; Btw, isn't it bad practice anyway to have an unbounded cache? Are there
&lt;br&gt;&amp;gt;&amp;gt; any
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; plans to replace the HashMaps used for the innerCaches with an actual
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; size-bounded cache with some eviction policy (perhaps EhCache or
&lt;br&gt;&amp;gt;&amp;gt; something)
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; ?
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; Thanks again,
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; TCK
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; On Mon, Dec 7, 2009 at 4:37 PM, Erick Erickson &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26689424&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;erickerickson@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;wrote:
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; What this sounds like is that you're not really closing your
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; readers even though you think you are. Sorting indeed uses up
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; significant memory when it populates internal caches and keeps
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; it around for later use (which is one of the reasons that warming
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; queries matter). But if you really do close the reader, I'm pretty
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; sure the memory should be GC-able.
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; One thing that trips people up is IndexReader.reopen(). If it
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; returns a reader different than the original, you *must* close the
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; old one. If you don't, the old reader is still hanging around and
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; memory won't be returne.... An example from the Javadocs...
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;  IndexReader reader = ...
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;  ...
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;  IndexReader new = r.reopen();
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;  if (new != reader) {
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;   ...     // reader was reopened
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;   reader.close();
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;  }
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;  reader = new;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;  ...
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; If this is irrelevant, could you post your close/open
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; code?
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; HTH
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; Erick
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; On Mon, Dec 7, 2009 at 4:27 PM, TCK &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26689424&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;moonwatcher32329@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; Hi,
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; I'm having heap memory issues when I do lucene queries involving
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; sorting
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; by
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; a string field. Such queries seem to load a lot of data in to the
&lt;br&gt;&amp;gt;&amp;gt; heap.
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; Moreover lucene seems to hold on to references to this data even
&lt;br&gt;&amp;gt;&amp;gt; after
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; the
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; index reader has been closed and a full GC has been run. Some of the
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; consequences of this are that in my generational heap configuration
&lt;br&gt;&amp;gt;&amp;gt; a
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; lot
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; of
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; memory gets promoted to tenured space each time I close the old
&lt;br&gt;&amp;gt;&amp;gt; index
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; reader
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; and after opening and querying using a new one, and the tenured
&lt;br&gt;&amp;gt;&amp;gt; space
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; eventually gets fragmented causing a lot of promotion failures
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; resulting
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; in
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; jvm hangs while the jvm does stop-the-world GCs.
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; Does anyone know any workarounds to avoid these memory issues when
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; doing
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; such lucene queries?
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; My profiling showed that even after a full GC lucene is holding on
&lt;br&gt;&amp;gt;&amp;gt; to a
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; lot
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; of references to field value data notably via the
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; FieldCacheImpl/ExtendedFieldCacheImpl. I noticed that the
&lt;br&gt;&amp;gt;&amp;gt; WeakHashMap
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; readerCaches are using unbounded HashMaps as the innerCaches and I
&lt;br&gt;&amp;gt;&amp;gt; used
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; reflection to replace these innerCaches with dummy empty HashMaps,
&lt;br&gt;&amp;gt;&amp;gt; but
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; still
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; I'm seeing the same behavior. I wondered if anyone has gone through
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; these
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; same issues before and would offer any advice.
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; Thanks a lot,
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; TCK
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26689424&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26689424&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26689424&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26689424&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/heap-memory-issues-when-sorting-by-a-string-field-tp26684470p26689424.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26689406</id>
	<title>Re: heap memory issues when sorting by a string field</title>
	<published>2009-12-07T22:45:34Z</published>
	<updated>2009-12-07T22:45:34Z</updated>
	<author>
		<name>TCK-2</name>
	</author>
	<content type="html">Thanks for the feedback guys. The evidence I have collected does point to an
&lt;br&gt;issue either in the java WeakHashMap implementation or in Lucene's use of
&lt;br&gt;it. In particular, I used reflection to replace the WeakHashMap instances
&lt;br&gt;with my own dummy Map that does a no-op for the put operation, and although
&lt;br&gt;this caused tons more garbage to be created for each search query the CMS
&lt;br&gt;executions always collected that garbage and brought down the tenured space
&lt;br&gt;usage to a small value.
&lt;br&gt;&lt;br&gt;Before that, I tried calling clear() on the WeakHashMap instances and then
&lt;br&gt;calling size() which calls expungeStaleEntries() but that didn't help. There
&lt;br&gt;may be indeed be a case of double memory usage for a while (until enough CMS
&lt;br&gt;executions have run) as Tom pointed out, but I don't fully understand what's
&lt;br&gt;happenning yet.
&lt;br&gt;&lt;br&gt;Also, bizzarely during my introspection of the readerCache WeakHashMap
&lt;br&gt;instances I found an instance of
&lt;br&gt;org.apache.lucene.index.CompoundFileReader$CSIndexInput as a key. Looking at
&lt;br&gt;the code I don't see how anything other than an IndexReader could possibly
&lt;br&gt;get there, and this class certainly doesn't extend IndexReader. Any ideas?
&lt;br&gt;:-) Maybe I need to get more sleep.
&lt;br&gt;&lt;br&gt;Btw, is searching with a sort by a text field not a common use-case of
&lt;br&gt;lucene? I've been testing with only 1Gb indexes and I'm pretty sure there
&lt;br&gt;are much larger indexes out there.
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;TCK
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;On Mon, Dec 7, 2009 at 7:57 PM, Tom Hill &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26689406&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;solr-list@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hey, that's a nice little Class! I hadn't see it before. But it sounds like
&lt;br&gt;&amp;gt; the asynchronous cleanup might deal with the problem I mentioned above (but
&lt;br&gt;&amp;gt; I haven't looked at the code yet).
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; It's an apache license - but you mentioned something about no third party
&lt;br&gt;&amp;gt; libraries. Is that a policy for Lucene?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Tom
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Mon, Dec 7, 2009 at 4:44 PM, Jason Rutherglen &amp;lt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26689406&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jason.rutherglen@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; I wonder if Google Collections (even though we don't use third party
&lt;br&gt;&amp;gt; &amp;gt; libraries) concurrent map, which supports weak keys, handles the
&lt;br&gt;&amp;gt; &amp;gt; removal of weakly referenced keys in a more elegant way than Java's
&lt;br&gt;&amp;gt; &amp;gt; WeakHashMap?
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; On Mon, Dec 7, 2009 at 4:38 PM, Tom Hill &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26689406&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;solr-list@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; Hi -
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; If I understand correctly, WeakHashMap does not free the memory for the
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; value (cached data) when the key is nulled, or even when the key is
&lt;br&gt;&amp;gt; &amp;gt; garbage
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; collected.
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; It requires one more step: a method on WeakHashMap must be called to
&lt;br&gt;&amp;gt; &amp;gt; allow
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; it to release its hard reference to the cached data. It appears that
&lt;br&gt;&amp;gt; most
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; methods in WeakHashMap end up calling expungeStaleEntries, which will
&lt;br&gt;&amp;gt; &amp;gt; clear
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; the hard reference. But you have to call some method on the map, before
&lt;br&gt;&amp;gt; &amp;gt; the
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; memory is eligible for garbage collection.
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; So it requires four stages to free the cached data. Null the key; A GC
&lt;br&gt;&amp;gt; to
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; release the weak reference to the key; A call to some method on the
&lt;br&gt;&amp;gt; map;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; Then the next GC cycle should free the value.
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; So it seems possible that you could end up with double memory usage for
&lt;br&gt;&amp;gt; a
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; time. If you don't have a GC between the time that you close the old
&lt;br&gt;&amp;gt; &amp;gt; reader,
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; and you start to load the field cache entry for the next reader, then
&lt;br&gt;&amp;gt; the
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; key may still be hanging around uncollected.
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; At that point, it may run a GC when you allocate the new cache, but
&lt;br&gt;&amp;gt; &amp;gt; that's
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; only the first GC. It can't free the cached data until after the next
&lt;br&gt;&amp;gt; &amp;gt; call
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; to expungeStaleEntries, so for a while you have both caches around.
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; This extra usage could cause things to move into tenured space. Could
&lt;br&gt;&amp;gt; &amp;gt; this
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; be causing your problem?
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; Workaround would be to cause some method to be called on the
&lt;br&gt;&amp;gt; WeakHashMap.
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; You don't want to call get(), since that will try to populate the
&lt;br&gt;&amp;gt; cache.
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; Maybe if you tried putting a small value to the cache, and doing a GC,
&lt;br&gt;&amp;gt; &amp;gt; and
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; see if your memory drops then.
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; Tom
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; On Mon, Dec 7, 2009 at 1:48 PM, TCK &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26689406&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;moonwatcher32329@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; Thanks for the response. But I'm definitely calling close() on the old
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; reader and opening a new one (not using reopen). Also, to simplify the
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; analysis, I did my test with a single-threaded requester to eliminate
&lt;br&gt;&amp;gt; &amp;gt; any
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; concurrency issues.
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; I'm doing:
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; sSearcher.getIndexReader().close();
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; sSearcher.close(); // this actually seems to be a no-op
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; IndexReader newIndexReader = IndexReader.open(newDirectory);
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; sSearcher = new IndexSearcher(newIndexReader);
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; Btw, isn't it bad practice anyway to have an unbounded cache? Are
&lt;br&gt;&amp;gt; there
&lt;br&gt;&amp;gt; &amp;gt; any
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; plans to replace the HashMaps used for the innerCaches with an actual
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; size-bounded cache with some eviction policy (perhaps EhCache or
&lt;br&gt;&amp;gt; &amp;gt; something)
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; ?
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; Thanks again,
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; TCK
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; On Mon, Dec 7, 2009 at 4:37 PM, Erick Erickson &amp;lt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26689406&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;erickerickson@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt;wrote:
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; What this sounds like is that you're not really closing your
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; readers even though you think you are. Sorting indeed uses up
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; significant memory when it populates internal caches and keeps
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; it around for later use (which is one of the reasons that warming
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; queries matter). But if you really do close the reader, I'm pretty
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; sure the memory should be GC-able.
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; One thing that trips people up is IndexReader.reopen(). If it
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; returns a reader different than the original, you *must* close the
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; old one. If you don't, the old reader is still hanging around and
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; memory won't be returne.... An example from the Javadocs...
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;nbsp;IndexReader reader = ...
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;nbsp;...
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;nbsp;IndexReader new = r.reopen();
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;nbsp;if (new != reader) {
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;nbsp; ... &amp;nbsp; &amp;nbsp; // reader was reopened
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;nbsp; reader.close();
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;nbsp;}
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;nbsp;reader = new;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;nbsp;...
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; If this is irrelevant, could you post your close/open
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; code?
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; HTH
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; Erick
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; On Mon, Dec 7, 2009 at 4:27 PM, TCK &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26689406&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;moonwatcher32329@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; wrote:
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; Hi,
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; I'm having heap memory issues when I do lucene queries involving
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; sorting
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; by
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; a string field. Such queries seem to load a lot of data in to the
&lt;br&gt;&amp;gt; &amp;gt; heap.
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; Moreover lucene seems to hold on to references to this data even
&lt;br&gt;&amp;gt; &amp;gt; after
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; the
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; index reader has been closed and a full GC has been run. Some of
&lt;br&gt;&amp;gt; the
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; consequences of this are that in my generational heap
&lt;br&gt;&amp;gt; configuration
&lt;br&gt;&amp;gt; &amp;gt; a
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; lot
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; of
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; memory gets promoted to tenured space each time I close the old
&lt;br&gt;&amp;gt; &amp;gt; index
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; reader
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; and after opening and querying using a new one, and the tenured
&lt;br&gt;&amp;gt; &amp;gt; space
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; eventually gets fragmented causing a lot of promotion failures
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; resulting
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; in
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; jvm hangs while the jvm does stop-the-world GCs.
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; Does anyone know any workarounds to avoid these memory issues when
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; doing
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; such lucene queries?
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; My profiling showed that even after a full GC lucene is holding on
&lt;br&gt;&amp;gt; &amp;gt; to a
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; lot
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; of references to field value data notably via the
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; FieldCacheImpl/ExtendedFieldCacheImpl. I noticed that the
&lt;br&gt;&amp;gt; &amp;gt; WeakHashMap
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; readerCaches are using unbounded HashMaps as the innerCaches and I
&lt;br&gt;&amp;gt; &amp;gt; used
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; reflection to replace these innerCaches with dummy empty HashMaps,
&lt;br&gt;&amp;gt; &amp;gt; but
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; still
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; I'm seeing the same behavior. I wondered if anyone has gone
&lt;br&gt;&amp;gt; through
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; these
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; same issues before and would offer any advice.
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; Thanks a lot,
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; TCK
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; &amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26689406&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26689406&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/heap-memory-issues-when-sorting-by-a-string-field-tp26684470p26689406.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26689404</id>
	<title>TopFieldDocCollector and v3.0.0</title>
	<published>2009-12-07T22:44:25Z</published>
	<updated>2009-12-07T22:44:25Z</updated>
	<author>
		<name>Antsa</name>
	</author>
	<content type="html">I'm on 2.3.2 and looking to move to 2.9.1 or 3.0.0
&lt;br&gt;&lt;br&gt;In 2.9.1 TopFieldDocCollector is
&lt;br&gt;&lt;br&gt;&amp;quot;Deprecated. Please use TopFieldCollector instead.&amp;quot;
&lt;br&gt;&lt;br&gt;in 3.0.0 TopFieldCollector says
&lt;br&gt;&lt;br&gt;NOTE: This API is experimental and might change in incompatible ways in the next 
&lt;br&gt;release
&lt;br&gt;&lt;br&gt;What is the suggested path for migrating TopFieldDocCollector usage?
&lt;br&gt;&lt;br&gt;Antony
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26689404&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26689404&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/TopFieldDocCollector-and-v3.0.0-tp26689404p26689404.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26689395</id>
	<title>Re: IndexWriter creates multiple .cfs files</title>
	<published>2009-12-07T22:43:06Z</published>
	<updated>2009-12-07T22:43:06Z</updated>
	<author>
		<name>JSF Help</name>
	</author>
	<content type="html">Thanks Jason for quick reply and suggestion. I am definitely going to change directory implementation policy to have one .cfs file instead of hundreds in one directory. 
&lt;br&gt;&lt;br&gt;regards,
&lt;br&gt;Ranjan
&lt;br&gt;&lt;br&gt;&lt;br&gt;----- Original Message ----
&lt;br&gt;From: Jason Rutherglen &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26689395&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jason.rutherglen@...&lt;/a&gt;&amp;gt;
&lt;br&gt;To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26689395&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user@...&lt;/a&gt;
&lt;br&gt;Sent: Tue, December 8, 2009 12:00:59 PM
&lt;br&gt;Subject: Re: IndexWriter creates multiple .cfs files
&lt;br&gt;&lt;br&gt;RB,
&lt;br&gt;&lt;br&gt;That's expected behavior, each .cfs corresponds to all of a
&lt;br&gt;segment's files. You could write your own directory
&lt;br&gt;implementation that underneath writes to a single file. It's
&lt;br&gt;usually good to present what you're trying to accomplish (i.e.
&lt;br&gt;the why).
&lt;br&gt;&lt;br&gt;Jason
&lt;br&gt;&lt;br&gt;On Mon, Dec 7, 2009 at 10:25 PM, Cool The Breezer
&lt;br&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26689395&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;techcool.kumar@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hello Group,
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I am continuously updating an index and at the same time searcher also searches the index, which resulted in multiple .cfs files for each commit by IndexWriter. I am not sure whether this is an expected behavior or I need to merge each time after IndexWriter commits. In between the writer's commit, I reopen the IndexReader but still .cfs files keep on increasing. I would like to have one .cfs file which can be reopened frequently by reader and at the same time progressive commit by writer. Is it possible?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; - RB
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26689395&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26689395&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26689395&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26689395&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26689395&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26689395&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;java-user-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/IndexWriter-creates-multiple-.cfs-files-tp26689289p26689395.html" />
</entry>

</feed>
