You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rm...@apache.org on 2013/09/15 18:38:58 UTC
svn commit: r1523456 - in /lucene/dev/branches/lucene5207: ./ dev-tools/
dev-tools/scripts/ solr/ solr/core/
solr/core/src/java/org/apache/solr/handler/admin/
solr/core/src/java/org/apache/solr/spelling/suggest/fst/
solr/core/src/test-files/solr/collec...
Author: rmuir
Date: Sun Sep 15 16:38:57 2013
New Revision: 1523456
URL: http://svn.apache.org/r1523456
Log:
Merged /lucene/dev/trunk:r1523396-1523455
Added:
lucene/dev/branches/lucene5207/solr/core/src/java/org/apache/solr/spelling/suggest/fst/AnalyzingInfixLookupFactory.java
- copied unchanged from r1523455, lucene/dev/trunk/solr/core/src/java/org/apache/solr/spelling/suggest/fst/AnalyzingInfixLookupFactory.java
lucene/dev/branches/lucene5207/solr/core/src/test-files/solr/collection1/conf/analyzingInfixSuggest.txt
- copied unchanged from r1523455, lucene/dev/trunk/solr/core/src/test-files/solr/collection1/conf/analyzingInfixSuggest.txt
lucene/dev/branches/lucene5207/solr/core/src/test/org/apache/solr/spelling/suggest/TestAnalyzeInfixSuggestions.java
- copied unchanged from r1523455, lucene/dev/trunk/solr/core/src/test/org/apache/solr/spelling/suggest/TestAnalyzeInfixSuggestions.java
Modified:
lucene/dev/branches/lucene5207/ (props changed)
lucene/dev/branches/lucene5207/dev-tools/ (props changed)
lucene/dev/branches/lucene5207/dev-tools/scripts/diffSources.py
lucene/dev/branches/lucene5207/solr/ (props changed)
lucene/dev/branches/lucene5207/solr/CHANGES.txt (contents, props changed)
lucene/dev/branches/lucene5207/solr/core/ (props changed)
lucene/dev/branches/lucene5207/solr/core/src/java/org/apache/solr/handler/admin/LukeRequestHandler.java
lucene/dev/branches/lucene5207/solr/core/src/test-files/solr/collection1/conf/solrconfig-phrasesuggest.xml
Modified: lucene/dev/branches/lucene5207/dev-tools/scripts/diffSources.py
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5207/dev-tools/scripts/diffSources.py?rev=1523456&r1=1523455&r2=1523456&view=diff
==============================================================================
--- lucene/dev/branches/lucene5207/dev-tools/scripts/diffSources.py (original)
+++ lucene/dev/branches/lucene5207/dev-tools/scripts/diffSources.py Sun Sep 15 16:38:57 2013
@@ -50,7 +50,7 @@ while True:
elif l.endswith('\n'):
l = l[:-1]
if l.startswith('diff ') or l.startswith('Binary files '):
- keep = not l.endswith('timehints.txt') and l.lower().find('/build/') == -1 and (l.lower().startswith('Only in') or ((l.lower().endswith('.java') or l.lower().endswith('.txt') or l.lower().endswith('.xml') or l.lower().endswith('.iml')) and l.find('/.svn/') == -1))
+ keep = not l.endswith('timehints.txt') and l.lower().find('/build/') == -1 and (l.lower().startswith('Only in') or ((l.lower().endswith('.java') or l.lower().endswith('.txt') or l.lower().endswith('.xml') or l.lower().endswith('.iml') or l.lower().endswith('.html') or l.lower().endswith('.template') or l.lower().endswith('.py') or l.lower().endswith('.g') or l.lower().endswith('.properties')) and l.find('/.svn/') == -1))
if keep:
print
print
Modified: lucene/dev/branches/lucene5207/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5207/solr/CHANGES.txt?rev=1523456&r1=1523455&r2=1523456&view=diff
==============================================================================
--- lucene/dev/branches/lucene5207/solr/CHANGES.txt (original)
+++ lucene/dev/branches/lucene5207/solr/CHANGES.txt Sun Sep 15 16:38:57 2013
@@ -62,6 +62,22 @@ Velocity 1.7 and Velocity Tools 2.0
Apache UIMA 2.3.1
Apache ZooKeeper 3.4.5
+Detailed Change List
+----------------------
+
+New Features
+----------------------
+
+* SOLR-5167: Add support for AnalyzingInfixSuggester (AnalyzingInfixLookupFactory).
+ (Areek Zillur, Varun Thacker via Robert Muir)
+
+Other Changes
+----------------------
+
+* SOLR-5237: Add indexHeapUsageBytes to LukeRequestHandler, indicating how much
+ heap memory is being used by the underlying Lucene index structures.
+ (Areek Zillur via Robert Muir)
+
================== 4.5.0 ==================
Versions of Major Components
Modified: lucene/dev/branches/lucene5207/solr/core/src/java/org/apache/solr/handler/admin/LukeRequestHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5207/solr/core/src/java/org/apache/solr/handler/admin/LukeRequestHandler.java?rev=1523456&r1=1523455&r2=1523456&view=diff
==============================================================================
--- lucene/dev/branches/lucene5207/solr/core/src/java/org/apache/solr/handler/admin/LukeRequestHandler.java (original)
+++ lucene/dev/branches/lucene5207/solr/core/src/java/org/apache/solr/handler/admin/LukeRequestHandler.java Sun Sep 15 16:38:57 2013
@@ -555,6 +555,7 @@ public class LukeRequestHandler extends
indexInfo.add("numDocs", reader.numDocs());
indexInfo.add("maxDoc", reader.maxDoc());
indexInfo.add("deletedDocs", reader.maxDoc() - reader.numDocs());
+ indexInfo.add("indexHeapUsageBytes", getIndexHeapUsed(reader));
indexInfo.add("version", reader.getVersion()); // TODO? Is this different then: IndexReader.getCurrentVersion( dir )?
indexInfo.add("segmentCount", reader.leaves().size());
@@ -569,6 +570,21 @@ public class LukeRequestHandler extends
return indexInfo;
}
+ /** Returns the sum of RAM bytes used by each segment */
+ private static long getIndexHeapUsed(DirectoryReader reader) {
+ long indexHeapRamBytesUsed = 0;
+ for(AtomicReaderContext atomicReaderContext : reader.leaves()) {
+ AtomicReader atomicReader = atomicReaderContext.reader();
+ if (atomicReader instanceof SegmentReader) {
+ indexHeapRamBytesUsed += ((SegmentReader) atomicReader).ramBytesUsed();
+ } else {
+ // Not supported for any reader that is not a SegmentReader
+ return -1;
+ }
+ }
+ return indexHeapRamBytesUsed;
+ }
+
// Get terribly detailed information about a particular field. This is a very expensive call, use it with caution
// especially on large indexes!
@SuppressWarnings("unchecked")
Modified: lucene/dev/branches/lucene5207/solr/core/src/test-files/solr/collection1/conf/solrconfig-phrasesuggest.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5207/solr/core/src/test-files/solr/collection1/conf/solrconfig-phrasesuggest.xml?rev=1523456&r1=1523455&r2=1523456&view=diff
==============================================================================
--- lucene/dev/branches/lucene5207/solr/core/src/test-files/solr/collection1/conf/solrconfig-phrasesuggest.xml (original)
+++ lucene/dev/branches/lucene5207/solr/core/src/test-files/solr/collection1/conf/solrconfig-phrasesuggest.xml Sun Sep 15 16:38:57 2013
@@ -65,6 +65,24 @@
<str name="queryAnalyzerFieldType">phrase_suggest</str>
</searchComponent>
+ <!-- AnalyzingInfixLookup suggest component (default)-->
+ <searchComponent class="solr.SpellCheckComponent" name="infix_suggest_analyzing">
+ <lst name="spellchecker">
+ <str name="name">infix_suggest_analyzing</str>
+ <str name="classname">org.apache.solr.spelling.suggest.Suggester</str>
+ <str name="lookupImpl">org.apache.solr.spelling.suggest.fst.AnalyzingInfixLookupFactory</str>
+ <str name="buildOnCommit">false</str>
+
+ <!-- Suggester properties -->
+ <str name="suggestAnalyzerFieldType">text</str>
+
+ <str name="sourceLocation">analyzingInfixSuggest.txt</str>
+ </lst>
+
+ <!-- specify a fieldtype using keywordtokenizer + lowercase + cleanup -->
+ <str name="queryAnalyzerFieldType">phrase_suggest</str>
+ </searchComponent>
+
<!-- FuzzyLookup suggest component (default)-->
<searchComponent class="solr.SpellCheckComponent" name="fuzzy_suggest_analyzing">
<lst name="spellchecker">
@@ -183,7 +201,20 @@
</arr>
</requestHandler>
- <!-- Fuzzy analyzing handler with 1 max edit -->
+ <!-- Infix analyzing handler (default) -->
+ <requestHandler class="org.apache.solr.handler.component.SearchHandler" name="/infix_suggest_analyzing">
+ <lst name="defaults">
+ <str name="spellcheck">true</str>
+ <str name="spellcheck.dictionary">infix_suggest_analyzing</str>
+ <str name="spellcheck.collate">false</str>
+ <!-- NOTE: if this is false, results are alpha-ordered, not by weight! -->
+ <str name="spellcheck.onlyMorePopular">true</str>
+ </lst>
+ <arr name="components">
+ <str>infix_suggest_analyzing</str>
+ </arr>
+ </requestHandler>
+
<requestHandler class="org.apache.solr.handler.component.SearchHandler" name="/fuzzy_suggest_analyzing">
<lst name="defaults">
<str name="spellcheck">true</str>