[prev in list] [next in list] [prev in thread] [next in thread] 

List:       solr-dev
Subject:    Re: svn commit: r948935 [3/3] - in /mahout/trunk: buildtools/src/main/resources/ core/src/main/java/
From:       Grant Ingersoll <gsingers () apache ! org>
Date:       2010-06-30 12:57:45
Message-ID: 6093D283-7DE2-464D-B000-DCB452931FB6 () apache ! org
[Download RAW message or body]

Wrong list.  I knew this dev@ autocomplete was going to bite me one of these days.

-Grant

On Jun 30, 2010, at 8:52 AM, Grant Ingersoll wrote:

> Sean,
> 
> I don't understand why the idField stuff is removed from the Lucene stuff.   It \
> appears to have been dropped for MAHOUT-379 (rev 936183) and then commented out on \
> this commit, but this is pretty important functionality for people coming from \
> Lucene.  Without it, one has no way of mapping the vectors back to the original \
> documents.  It's one thing to change over to change how we use vector labels, it's \
> another to completely remove the functionality. 
> It appears that we need to switch to using the NamedVector when idField is not \
> null. 
> -Grant
> 
> Begin forwarded message:
> 
> > From: srowen@apache.org
> > Date: May 27, 2010 2:02:23 PM EDT
> > To: commits@mahout.apache.org
> > Subject: svn commit: r948935 [3/3] - in /mahout/trunk: \
> > buildtools/src/main/resources/ \
> > core/src/main/java/org/apache/mahout/cf/taste/eval/ \
> > core/src/main/java/org/apache/mahout/cf/taste/hadoop/ \
> >                 core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/ \
> >                 core/src/m...
> > Reply-To: dev@mahout.apache.org
> > 
> > Modified: mahout/trunk/utils/src/main/java/org/apache/mahout/utils/vectors/lucene/LuceneIterable.java
> >                 
> > URL: http://svn.apache.org/viewvc/mahout/trunk/utils/src/main/java/org/apache/maho \
> > ut/utils/vectors/lucene/LuceneIterable.java?rev=948935&r1=948934&r2=948935&view=diff
> >  ==============================================================================
> > --- mahout/trunk/utils/src/main/java/org/apache/mahout/utils/vectors/lucene/LuceneIterable.java \
> >                 (original)
> > +++ mahout/trunk/utils/src/main/java/org/apache/mahout/utils/vectors/lucene/LuceneIterable.java \
> > Thu May 27 18:02:20 2010 @@ -32,17 +32,17 @@ import \
> >                 org.apache.mahout.math.Vector;
> > * {@link Vector}. The Field used to create the Vector currently must have Term \
> >                 Vectors stored for it.
> > */
> > public class LuceneIterable implements Iterable<Vector> {
> > -  
> > +
> > +  public static final double NO_NORMALIZING = -1.0;
> > +
> > private final IndexReader indexReader;
> > private final String field;
> > -  private final String idField;
> > -  private final FieldSelector idFieldSelector;
> > +  //private final String idField;
> > +  //private final FieldSelector idFieldSelector;
> > 
> > private final VectorMapper mapper;
> > private double normPower = NO_NORMALIZING;
> > -  
> > -  public static final double NO_NORMALIZING = -1.0;
> > -  
> > +
> > public LuceneIterable(IndexReader reader, String idField, String field, \
> > VectorMapper mapper) { this(reader, idField, field, mapper, NO_NORMALIZING);
> > }
> > @@ -70,9 +70,9 @@ public class LuceneIterable implements I
> > if (normPower != NO_NORMALIZING && normPower < 0) {
> > throw new IllegalArgumentException("normPower must either be -1 or >= 0");
> > }
> > -    idFieldSelector = new SetBasedFieldSelector(Collections.singleton(idField), \
> > Collections.<String>emptySet()); +    //idFieldSelector = new \
> > SetBasedFieldSelector(Collections.singleton(idField), \
> > Collections.<String>emptySet()); this.indexReader = reader;
> > -    this.idField = idField;
> > +    //this.idField = idField;
> > this.field = field;
> > this.mapper = mapper;
> > this.normPower = normPower;
> 
> 
> 

--------------------------
Grant Ingersoll
http://www.lucidimagination.com/

Search the Lucene ecosystem using Solr/Lucene: http://www.lucidimagination.com/search


[Attachment #3 (unknown)]

<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; \
-webkit-line-break: after-white-space; ">Wrong list. &nbsp;I knew this dev@ \
autocomplete was going to bite me one of these \
days.<div><br></div><div>-Grant</div><div><br><div><div>On Jun 30, 2010, at 8:52 AM, \
Grant Ingersoll wrote:</div><br class="Apple-interchange-newline"><blockquote \
type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; \
-webkit-line-break: after-white-space; ">Sean,<div><div><br></div><div><div>I don't \
understand why the idField stuff is removed from the Lucene stuff. &nbsp; It appears \
to have been dropped for MAHOUT-379 (rev 936183) and then commented out on this \
commit, but this is pretty important functionality for people coming from Lucene. \
&nbsp;Without it, one has no way of mapping the vectors back to the original \
documents. &nbsp;It's one thing to change over to change how we use vector labels, \
it's another to completely remove the functionality.</div><div><br></div><div>It \
appears that we need to switch to using the NamedVector when idField is not \
null.</div><div><br></div><div>-Grant</div><div><br></div><div>Begin forwarded \
message:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div \
style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: \
0px;"><span style="font-family:'Helvetica'; font-size:medium; color:rgba(0, 0, 0, \
1);"><b>From: </b></span><span style="font-family:'Helvetica'; font-size:medium;"><a \
href="mailto:srowen@apache.org">srowen@apache.org</a><br></span></div><div \
style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: \
0px;"><span style="font-family:'Helvetica'; font-size:medium; color:rgba(0, 0, 0, \
1);"><b>Date: </b></span><span style="font-family:'Helvetica'; font-size:medium;">May \
27, 2010 2:02:23 PM EDT<br></span></div><div style="margin-top: 0px; margin-right: \
0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; \
font-size:medium; color:rgba(0, 0, 0, 1);"><b>To: </b></span><span \
style="font-family:'Helvetica'; font-size:medium;"><a \
href="mailto:commits@mahout.apache.org">commits@mahout.apache.org</a><br></span></div><div \
style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: \
0px;"><span style="font-family:'Helvetica'; font-size:medium; color:rgba(0, 0, 0, \
1);"><b>Subject: </b></span><span style="font-family:'Helvetica'; \
font-size:medium;"><b>svn commit: r948935 [3/3] - in /mahout/trunk: \
buildtools/src/main/resources/ core/src/main/java/org/apache/mahout/cf/taste/eval/ \
core/src/main/java/org/apache/mahout/cf/taste/hadoop/ \
core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/ \
core/src/m...</b><br></span></div><div style="margin-top: 0px; margin-right: 0px; \
margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; \
font-size:medium; color:rgba(0, 0, 0, 1);"><b>Reply-To: </b></span><span \
style="font-family:'Helvetica'; font-size:medium;"><a \
href="mailto:dev@mahout.apache.org">dev@mahout.apache.org</a><br></span></div><div><br>Modified: \
mahout/trunk/utils/src/main/java/org/apache/mahout/utils/vectors/lucene/LuceneIterable.java<br>URL: \
<a href="http://svn.apache.org/viewvc/mahout/trunk/utils/src/main/java/org/apache/maho \
ut/utils/vectors/lucene/LuceneIterable.java?rev=948935&amp;r1=948934&amp;r2=948935&amp \
;view=diff">http://svn.apache.org/viewvc/mahout/trunk/utils/src/main/java/org/apache/m \
ahout/utils/vectors/lucene/LuceneIterable.java?rev=948935&amp;r1=948934&amp;r2=948935& \
amp;view=diff</a><br>==============================================================================<br>--- \
mahout/trunk/utils/src/main/java/org/apache/mahout/utils/vectors/lucene/LuceneIterable.java \
(original)<br>+++ mahout/trunk/utils/src/main/java/org/apache/mahout/utils/vectors/lucene/LuceneIterable.java \
Thu May 27 18:02:20 2010<br>@@ -32,17 +32,17 @@ import \
org.apache.mahout.math.Vector;<br> &nbsp;* {@link Vector}. The Field used to create \
the Vector currently must have Term Vectors stored for it.<br> &nbsp;*/<br> public \
class LuceneIterable implements Iterable&lt;Vector&gt; {<br>- &nbsp;<br>+<br>+ \
&nbsp;public static final double NO_NORMALIZING = -1.0;<br>+<br> &nbsp;&nbsp;private \
final IndexReader indexReader;<br> &nbsp;&nbsp;private final String field;<br>- \
&nbsp;private final String idField;<br>- &nbsp;private final FieldSelector \
idFieldSelector;<br>+ &nbsp;//private final String idField;<br>+ &nbsp;//private \
final FieldSelector idFieldSelector;<br><br> &nbsp;&nbsp;private final VectorMapper \
mapper;<br> &nbsp;&nbsp;private double normPower = NO_NORMALIZING;<br>- &nbsp;<br>- \
&nbsp;public static final double NO_NORMALIZING = -1.0;<br>- &nbsp;<br>+<br> \
&nbsp;&nbsp;public LuceneIterable(IndexReader reader, String idField, String field, \
VectorMapper mapper) {<br> &nbsp;&nbsp;&nbsp;&nbsp;this(reader, idField, field, \
mapper, NO_NORMALIZING);<br> &nbsp;&nbsp;}<br>@@ -70,9 +70,9 @@ public class \
LuceneIterable implements I<br> &nbsp;&nbsp;&nbsp;&nbsp;if (normPower != \
NO_NORMALIZING &amp;&amp; normPower &lt; 0) {<br> \
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;throw new IllegalArgumentException("normPower \
must either be -1 or &gt;= 0");<br> &nbsp;&nbsp;&nbsp;&nbsp;}<br>- \
&nbsp;&nbsp;&nbsp;idFieldSelector = new \
SetBasedFieldSelector(Collections.singleton(idField), \
Collections.&lt;String&gt;emptySet());<br>+ &nbsp;&nbsp;&nbsp;//idFieldSelector = new \
SetBasedFieldSelector(Collections.singleton(idField), \
Collections.&lt;String&gt;emptySet());<br> &nbsp;&nbsp;&nbsp;&nbsp;this.indexReader = \
reader;<br>- &nbsp;&nbsp;&nbsp;this.idField = idField;<br>+ \
&nbsp;&nbsp;&nbsp;//this.idField = idField;<br> &nbsp;&nbsp;&nbsp;&nbsp;this.field = \
field;<br> &nbsp;&nbsp;&nbsp;&nbsp;this.mapper = mapper;<br> \
&nbsp;&nbsp;&nbsp;&nbsp;this.normPower = \
normPower;<br></div></blockquote></div><br><div><br></div><div><br></div></div></div></blockquote></div><br><div>
 <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, \
0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: \
normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; \
text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; \
widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; \
-webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; \
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div><span \
class="Apple-style-span" style="font-size: 12px; \
"><div>--------------------------</div><div>Grant Ingersoll</div><div><a \
href="http://www.lucidimagination.com/">http://www.lucidimagination.com/</a></div><div><br></div><div>Search \
the Lucene ecosystem using Solr/Lucene:&nbsp;<a \
href="http://www.lucidimagination.com/search">http://www.lucidimagination.com/search</a></div></span></div></span>
 </div>
<br></div></body></html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic