Index time synonyms

2008-01-24 Thread anuvenk

I have a hard time understanding the synonyms behaviour..especially because i
don't have the syn filter at index time.

If i have this synonym at index time

Alternative Sentence,Probation before Judgement,Pretrial Diversion

does all occurrence of 'alternative sentence' also get indexed as 'probation
judgement' and 'pretrial diversion' ?
or does it do this wierd grouping 
(alternative probation pretrial)(sentence diversion)judgement

so all occurrences of 'alternative' will be indexed as 'sentence' and
'diversion' ? Then what about the word 'judgement'?
Please someone help me understand this. I have another  question related to
synonyms posted here 
http://www.nabble.com/solr-synonyms-behaviour-td15051211.html
..please help with that too...


-- 
View this message in context: 
http://www.nabble.com/Index-time-synonyms-tp15073889p15073889.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: Getting SolrSharp to work, Part 2

2008-01-24 Thread Jeff Rodenburg
Hey Peter - if you could submit your changes as an svn patch, we could apply
the update much faster.

thanks,
jeff



On Jan 23, 2008 2:42 AM, Peter Thygesen <[EMAIL PROTECTED]> wrote:

> I wrote a small client in .Net which query Solr and dumps the result on
> screen.. fantastic low-tech.. ;)
>
> However I ran into new SolrSharp problems. My schema allows a particular
> field to be multiValued, but if it only has one value, it will cause
> SolrSharp fail in line 88 of Class: IndexFiledAttribute.
>
> My SearchRecord property is an array (List) and line 88 tries to set my
> property as if it was a string. The code should be corrected by checking
> if the property is an array and not whether it has 1 value or more.
> E.g. change line 85 to 085> if(!this.PropertyInfo.PropertyType.IsArray)
>
> Original code (from class IndexFiledAttribute):
> 082> public void SetValue(SearchRecord searchRecord)
> 083> {
> 084>   XmlNodeList xnlvalues =
> searchRecord.XNodeRecord.SelectNodes(this.XnodeExpression);
> 085>   if (xnlvalues.Count == 1)   //single value
> 086>   {
> 087> XmlNode xnodevalue = xnlvalues[0];
> 088> this.PropertyInfo.SetValue(searchRecord,
> Convert.ChangeType(xnodevalue.InnerText, this.PropertyInfo.PropertyType)
> , null);
> 089>   }
> 090>   else if (xnlvalues.Count > 1)   //array
> 091>   {
> 092> Type basetype =
> this.PropertyInfo.PropertyType.GetElementType();
> 093> Array valueArray = Array.CreateInstance(basetype,
> xnlvalues.Count);
> 094> for (int i = 0; i < xnlvalues.Count; i++)
> 095> {
> 096>
> valueArray.SetValue(Convert.ChangeType(xnlvalues[i].InnerText,
> basetype), i);
> 097> }
> 098> this.PropertyInfo.SetValue(searchRecord, valueArray, null);
> 099>   }
> 100> }
>
> My code (replace):
> 085>if(!this.PropertyInfo.PropertyType.IsArray) // single value
> 090>else // array
>
> Cheers,
> Peter Thygesen
>
> -- hope to see you all at ApacheCon in Amsterdam :)
>
>
>


Re: Updating and Appending

2008-01-24 Thread Jeff Rodenburg
On Jan 23, 2008 1:29 PM, Chris Harris <[EMAIL PROTECTED]> wrote:

>
> >>> And then if you're using
> a client such as solrsharp, there's the question of whether *it* will
> slurp the whole stream into memory.
>
>
Solrsharp reads of the XML stream from Solr use standard dotnet framework
XML objects, which by default read the entirety of the stream into memory
before returning control back to your code.  There are facilities in the
dotnet framework which provide for reading XML data in chunks vs. the full
stream, but solrsharp at present uses the defaults of the framework.

-- jeff


Re: "runs" vs. "running" - Query time vs Index Time stemming

2008-01-24 Thread Ryan McKinley


protected="protwords.txt"/>


isn't that what protwords.txt does?



"runs" vs. "running" - Query time vs Index Time stemming

2008-01-24 Thread Matthew Runo

Hello folks..

I'm seeing something that makes total sense to me, but the pointy  
haired bosses don't like it, so I've gotta come up with a solution. We  
search a pretty standard product catalog, and due to stemming a search  
for "running shoes" matches things with "Runs 1/2 a size large" in the  
product description. I've tried tweaking the Query / Index time  
settings, below, but I still get the stemming. Any ideas on how I can  
make "running" not match "runs" in product descriptions, while still  
keeping the words "run", "runs", "running"... searchable in the  
product descriptions (just not stemming on them).


Here's my field config...

positionIncrementGap="100">



synonyms="synonyms.txt" ignoreCase="true" expand="false"/>
ignoreCase="true" words="stopwords.txt"/>
generateWordParts="1" generateNumberParts="1"
catenateWords="1" catenateNumbers="1"  
catenateAll="0" splitOnCaseChange="1"/>
protected="protwords.txt"/>
class="solr.RemoveDuplicatesTokenFilterFactory"/>





ignoreCase="true" words="stopwords.txt"/>
generateWordParts="0" generateNumberParts="1"
catenateWords="0" catenateNumbers="0"  
catenateAll="0" splitOnCaseChange="1"/>
protected="protwords.txt"/>
class="solr.RemoveDuplicatesTokenFilterFactory"/>





I don't think I can use stopwords, because I need to be able to search  
on all of these words, just not match "runs" when they search  
"running". In most cases the other stemming is fine, and if possible  
I'd like to not completely turn it off. That is, however, an option.  
It seems to be a solvable problem though - any ideas would be greatly  
appreciated.


Thanks!

Matthew Runo
Software Developer
Zappos.com
702.943.7833



Re: java.lang.IncompatibleClassChangeError

2008-01-24 Thread Marcus Herou
Yep. I removed the "build" dir and rerun ant dist. Now it works silly me...

Anyway here's the app
http://search.tailsweep.com/searchfeeds.do?q=apple

Kindly

//Marcus

On 1/24/08, Ryan McKinley <[EMAIL PROTECTED]> wrote:
>
> make sure to run "ant clean" if you get funny compilation errors after
> an update.
>
>
> Marcus Herou wrote:
> > Hi.
> >
> > I did a svn update in trunk and deployed new war on server and jars on
> > client (after recompile) and got this.
> > I read that the SolrServer changed from Abstract Class to interface.
> Does
> > this have something to do with it perhaps?
> >
> >
> > java.lang.IncompatibleClassChangeError: Found class
> > org.apache.solr.client.solrj.SolrServer,
> > but interface was expected
> >   at org.apache.solr.client.solrj.request.QueryRequest.process(
> QueryRequest.java:80)
> >   at org.apache.solr.client.solrj.SolrServer.query(SolrServer.java
> :98)
> >   at com.tailsweep.core.lucene.SolrDocumentIndexer.search(
> SolrDocumentIndexer.java:364)
> >   at com.tailsweep.core.business.CrawlerServiceImpl.search(
> CrawlerServiceImpl.java:1646)
> >   at com.tailsweep.core.business.CrawlerServiceImpl.searchFeeds(
> CrawlerServiceImpl.java:3197)
> >   at com.tailsweep.search.web.SearchFeeds.doGet(SearchFeeds.java:87)
> >   at javax.servlet.http.HttpServlet.service(HttpServlet.java:115)
> >   at javax.servlet.http.HttpServlet.service(HttpServlet.java:92)
> >   at com.caucho.server.dispatch.ServletFilterChain.doFilter(
> ServletFilterChain.java:106)
> >   at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(
> RuleChain.java:130)
> >   at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(
> RuleChain.java:107)
> >   at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(
> UrlRewriter.java:78)
> >   at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(
> UrlRewriteFilter.java:383)
> >   at com.caucho.server.dispatch.FilterFilterChain.doFilter(
> FilterFilterChain.java:70)
> >   at com.tailsweep.web.filters.LocaleFilter.doFilter(
> LocaleFilter.java:43)
> >   at com.caucho.server.dispatch.FilterFilterChain.doFilter(
> FilterFilterChain.java:70)
> >   at com.tailsweep.web.filters.CharsetFilter.doFilter(
> CharsetFilter.java:91)
> >   at com.caucho.server.dispatch.FilterFilterChain.doFilter(
> FilterFilterChain.java:70)
> >   at com.tailsweep.web.filters.BlackListFilter.doFilter(
> BlackListFilter.java:72)
> >   at com.caucho.server.dispatch.FilterFilterChain.doFilter(
> FilterFilterChain.java:70)
> >   at com.caucho.server.webapp.WebAppFilterChain.doFilter(
> WebAppFilterChain.java:173)
> >   at com.caucho.server.dispatch.ServletInvocation.service(
> ServletInvocation.java:229)
> >   at com.caucho.server.http.HttpRequest.handleRequest(
> HttpRequest.java:274)
> >   at com.caucho.server.port.TcpConnection.run(TcpConnection.java
> :514)
> >   at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:520)
> >   at com.caucho.util.ThreadPool.run(ThreadPool.java:442)
> >   at java.lang.Thread.run(Thread.java:619)
> >
> >
> >
>
>


-- 
Marcus Herou Solution Architect and Java developer Tailsweep AB
+46702561312
[EMAIL PROTECTED]
http://www.tailsweep.com/
http://blogg.tailsweep.com/


Re: java.lang.IncompatibleClassChangeError

2008-01-24 Thread Ryan McKinley
make sure to run "ant clean" if you get funny compilation errors after 
an update.



Marcus Herou wrote:

Hi.

I did a svn update in trunk and deployed new war on server and jars on
client (after recompile) and got this.
I read that the SolrServer changed from Abstract Class to interface. Does
this have something to do with it perhaps?


java.lang.IncompatibleClassChangeError: Found class
org.apache.solr.client.solrj.SolrServer,
but interface was expected
at 
org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:80)
at org.apache.solr.client.solrj.SolrServer.query(SolrServer.java:98)
at 
com.tailsweep.core.lucene.SolrDocumentIndexer.search(SolrDocumentIndexer.java:364)
at 
com.tailsweep.core.business.CrawlerServiceImpl.search(CrawlerServiceImpl.java:1646)
at 
com.tailsweep.core.business.CrawlerServiceImpl.searchFeeds(CrawlerServiceImpl.java:3197)
at com.tailsweep.search.web.SearchFeeds.doGet(SearchFeeds.java:87)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:115)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:92)
at 
com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:106)
at 
org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:130)
at 
org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:107)
at 
org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:78)
at 
org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:383)
at 
com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:70)
at com.tailsweep.web.filters.LocaleFilter.doFilter(LocaleFilter.java:43)
at 
com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:70)
at 
com.tailsweep.web.filters.CharsetFilter.doFilter(CharsetFilter.java:91)
at 
com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:70)
at 
com.tailsweep.web.filters.BlackListFilter.doFilter(BlackListFilter.java:72)
at 
com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:70)
at 
com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:173)
at 
com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:229)
at 
com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:274)
at com.caucho.server.port.TcpConnection.run(TcpConnection.java:514)
at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:520)
at com.caucho.util.ThreadPool.run(ThreadPool.java:442)
at java.lang.Thread.run(Thread.java:619)







Re: java.lang.IncompatibleClassChangeError

2008-01-24 Thread Yonik Seeley
On Jan 24, 2008 9:14 AM, Marcus Herou <[EMAIL PROTECTED]> wrote:
> I did a svn update in trunk and deployed new war on server and jars on
> client (after recompile) and got this.
> I read that the SolrServer changed from Abstract Class to interface. Does
> this have something to do with it perhaps?

Looks like it... are you certain you recompiled?

-Yonik

> java.lang.IncompatibleClassChangeError: Found class
> org.apache.solr.client.solrj.SolrServer,
> but interface was expected
> at 
> org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:80)
> at org.apache.solr.client.solrj.SolrServer.query(SolrServer.java:98)
> at 
> com.tailsweep.core.lucene.SolrDocumentIndexer.search(SolrDocumentIndexer.java:364)
> at 
> com.tailsweep.core.business.CrawlerServiceImpl.search(CrawlerServiceImpl.java:1646)
> at 
> com.tailsweep.core.business.CrawlerServiceImpl.searchFeeds(CrawlerServiceImpl.java:3197)
> at com.tailsweep.search.web.SearchFeeds.doGet(SearchFeeds.java:87)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:115)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:92)
> at 
> com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:106)
> at 
> org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:130)
> at 
> org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:107)
> at 
> org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:78)
> at 
> org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:383)
> at 
> com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:70)
> at 
> com.tailsweep.web.filters.LocaleFilter.doFilter(LocaleFilter.java:43)
> at 
> com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:70)
> at 
> com.tailsweep.web.filters.CharsetFilter.doFilter(CharsetFilter.java:91)
> at 
> com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:70)
> at 
> com.tailsweep.web.filters.BlackListFilter.doFilter(BlackListFilter.java:72)
> at 
> com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:70)
> at 
> com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:173)
> at 
> com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:229)
> at 
> com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:274)
> at com.caucho.server.port.TcpConnection.run(TcpConnection.java:514)
> at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:520)
> at com.caucho.util.ThreadPool.run(ThreadPool.java:442)
> at java.lang.Thread.run(Thread.java:619)
>
>
>
> --
> Marcus Herou Solution Architect and Java developer Tailsweep AB
> +46702561312
> [EMAIL PROTECTED]
> http://www.tailsweep.com/
> http://blogg.tailsweep.com/
>


java.lang.IncompatibleClassChangeError

2008-01-24 Thread Marcus Herou
Hi.

I did a svn update in trunk and deployed new war on server and jars on
client (after recompile) and got this.
I read that the SolrServer changed from Abstract Class to interface. Does
this have something to do with it perhaps?


java.lang.IncompatibleClassChangeError: Found class
org.apache.solr.client.solrj.SolrServer,
but interface was expected
at 
org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:80)
at org.apache.solr.client.solrj.SolrServer.query(SolrServer.java:98)
at 
com.tailsweep.core.lucene.SolrDocumentIndexer.search(SolrDocumentIndexer.java:364)
at 
com.tailsweep.core.business.CrawlerServiceImpl.search(CrawlerServiceImpl.java:1646)
at 
com.tailsweep.core.business.CrawlerServiceImpl.searchFeeds(CrawlerServiceImpl.java:3197)
at com.tailsweep.search.web.SearchFeeds.doGet(SearchFeeds.java:87)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:115)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:92)
at 
com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:106)
at 
org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:130)
at 
org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:107)
at 
org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:78)
at 
org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:383)
at 
com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:70)
at com.tailsweep.web.filters.LocaleFilter.doFilter(LocaleFilter.java:43)
at 
com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:70)
at 
com.tailsweep.web.filters.CharsetFilter.doFilter(CharsetFilter.java:91)
at 
com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:70)
at 
com.tailsweep.web.filters.BlackListFilter.doFilter(BlackListFilter.java:72)
at 
com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:70)
at 
com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:173)
at 
com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:229)
at 
com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:274)
at com.caucho.server.port.TcpConnection.run(TcpConnection.java:514)
at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:520)
at com.caucho.util.ThreadPool.run(ThreadPool.java:442)
at java.lang.Thread.run(Thread.java:619)



-- 
Marcus Herou Solution Architect and Java developer Tailsweep AB
+46702561312
[EMAIL PROTECTED]
http://www.tailsweep.com/
http://blogg.tailsweep.com/


Re: SnowballPorterFilterFactory and protected words

2008-01-24 Thread Daniele Salvatico

Thanks,

the solution is now detailed very clearly.

Just one more point, more theoretical then technical:

i'm using Solr in a e-commerce site, and i wanted to use protected words
also to reduce recall for certain queries.

It could be that a parallel approach using dismax boosting for fields such
as "product name" and "category" will,  beside increasing precision, also
reducing false hit recall?







hossman wrote:
> 
> 
> : I have a question about using the  "protected=" attribute with
> : SnowballPorterFilterFactory filter.
> 
> SnowballPorterFilterFactory doesn't (and has never) supported a protwords 
> option ... that feature is unique to the EnglishPorterFilterFactory.
> 
> this is probably just due to how they came about back in the pre-Apache 
> days of Solr ... the lucene SnowballFilter has to use reflection because 
> of the way the underlying Snowball Stemmer API works, and the 
> SnowballPorterFilterFactory just generates intsances of SnowballFilter.  
> Yonik wrote EnglishPorterFilterFactory to be more efficient by not doing 
> the reflection (at the expense of being hardcoded to use English) and when 
> the protwords feature was needed later it looks like it was only added 
> there.
> 
> adding a protwords option to SnowballPorterFilterFactory would be 
> possible, but the best way to do it would probably be to add support in 
> the underlying Lucene-Java class, then add a config option for it in Solr.
> 
> (if anyone is so inclined)
> 
> 
> 
> 
> -Hoss
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/SnowballPorterFilterFactory-and-protected-words-tp15042758p15061335.html
Sent from the Solr - User mailing list archive at Nabble.com.