You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Tobias Rübner <de...@tobr.eu> on 2011/07/25 16:41:34 UTC
using distributed search with the suggest component
Hi,
I try to use the suggest component (solr 3.3) with multiple cores.
I added a search component and a request handler as described in the docs (
http://wiki.apache.org/solr/Suggester) to my solrconfig.
That works fine for 1 core but querying my solr instance with the shards
parameter does not query multiple cores.
It just ignores the shards parameter.
http://localhost:8888/solr/core1/suggest?q=sa&shards=localhost:8888/solr/core1,localhost:8888/solr/core2
The documentation of the SpellCheckComponent (
http://wiki.apache.org/solr/SpellCheckComponent#Distributed_Search_Support)
is a bit vage in that point, because I don't know if this feature really
works with solr 3.3. It is targeted for solr 1.5, which will never come, but
says, it is now available.
I also tried the shards.qt paramater, but it does not change my results.
Thanks for any help,
Tobias
Re: Solr Suggester not working in sharding (distributed search)
Posted by bbi123 <bb...@gmail.com>.
Try this
http://solr:8983/solr/select?*q=*:**&spellcheck=true&spellcheck.build=true&spellcheck.q=toyata&qt=spell&shards.qt=/spell&shards=solr-shard1:8983/solr,solr-shard2:8983/solr
--
View this message in context: http://lucene.472066.n3.nabble.com/using-distributed-search-with-the-suggest-component-tp3197651p4118075.html
Sent from the Solr - User mailing list archive at Nabble.com.
Solr Suggester not working in sharding (distributed search)
Posted by Aniket Potdar <an...@anmsoft.com>.
I have two solr server (solr 4.5.1) which is running in shard..
I have implemented solr suggester using spellcheckComponent for
auto-suggester.
when i execute suggest url on individual core then the solr suggestion
is coming properly.
mysolr.com:8986/solr/core1/suggest?spellcheck.q=city%20of and
mysolr.com:8987/solr/core1/suggest?spellcheck.q=city%20of
when i fired url with refence to solr wiki
(wiki.apache.org/solr/SpellCheckComponent#Distributed_Search_Support)
the result is not coming and below exception is occur.
URL :-
mysolr.com:8986/solr/core1/select?shards=mysolr.com:8986/solr/core1,mysolr.com:8987/solr/core1&spellcheck.q=city%20of&shards.qt=%2Fsuggest&qt=suggest
java.lang.NullPointerException at
org.apache.solr.handler.component.QueryComponent.mergeIds(QueryComponent.java:843)
at
org.apache.solr.handler.component.QueryComponent.handleRegularResponses(QueryComponent.java:649)
at
org.apache.solr.handler.component.QueryComponent.handleResponses(QueryComponent.java:628)
at
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:311)
at
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1859) at
org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:703)
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:406)
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:195)
at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
at
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455)
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
at
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
at
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)
at
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384) at
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
at
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:368) at
org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
at
org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)
at
org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:942)
at
org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1004)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:640) at
org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235) at
org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)
at
org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)
at
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
at
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
at java.lang.Thread.run(Thread.java:619)
for reference below is my schema.xml and solrconfig.xml entry
|<searchComponentclass="solr.SpellCheckComponent" name="suggest">
<lst name="spellchecker">
<str name="name"<
span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;">>suggest</str>
<str name="classname">org.apache.solr.spelling.suggest.Suggester</str>
<str name="lookupImpl">org.apache.solr.spelling.suggest.tst.TSTLookupFactory</str>
<str name="field"
>sugg</str>
<str name="buildOnCommit
">true</str>
</lst>|
| <requestHandlerclass="org.apache.solr.handler.component.SearchHandler" name="/suggest">
<lst name="defaults">
<str name="spellcheck">on</str>
<str name="spellcheck.di
ctionary">suggest</str>
<str name="spellcheck.on
lyMorePopular">true</st
r>
<str name="spellcheck.co
unt">10</str>
<str name="spellcheck.co
llate">true</str
>
</lst>
<arr name="components">
<str>suggest</str>
</arr>|
|<fieldType name="text_autocomplete" class="solr.TextField" positionIncrementGap="100">
<analyzer>
<tokenizerclass=<
/span>"solr.KeywordTokenizerFactory"/>
<filterclass="solr.LowerCaseFilterFactory"/>
<filterclass="solr.TrimFilterFactory"/>
<filterclass="solr.SynonymFilterFactory" synonyms="syn.txt" ignoreCase="true" expand="true"/>
<filterclass="solr.RemoveDuplicatesTokenFilterFactory"/>
</analyzer>|
i have unique filed, id which is store = true in schema.xml
can any one please suggest the solution.
--
Thanks & Regards,
Aniket Potdar
| Java Developer | ANMsoft Technologies (P) Ltd. |
| 218-220 Building 2 Sector 1, MBP, Mahape, Navi Mumbai 400710 |
Maharashtra | India |
| Email - aniket.potdar@anmsoft.com |
Re: using distributed search with the suggest component
Posted by mdz-munich <se...@bsb-muenchen.de>.
Hi Tobias,
sadly, it seems you are right.
After a little bit investigation we also recognized that some names (we use
it for auto-completing author-names), are missing. And since it is a
distributed setup ...
But I am almost sure it worked with Solr 3.2.
Best regards,
Sebastian
--
View this message in context: http://lucene.472066.n3.nabble.com/using-distributed-search-with-the-suggest-component-tp3197651p3226082.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: using distributed search with the suggest component
Posted by Tobias Rübner <de...@tobr.eu>.
Thanks, but this does not work.
Looking at the log files, I see only one request, when executing a search.
Executing a request to the default servlet (/select) with multiple shards,
each core gets ask for the current query.
Any other suggestions?
Tobias
On Tue, Jul 26, 2011 at 2:11 PM, mdz-munich <sebastian.lutze@bsb-muenchen.de
> wrote:
> Hi Tobias,
>
> try this, it works for us (Solr 3.3):
>
> solrconfig.xml:
>
> /<searchComponent name="suggest" class="solr.SpellCheckComponent">
> <str name="queryAnalyzerFieldType">word</str>
> <lst name="spellchecker">
> <str name="name">suggestion</str>
> <str name="classname">org.apache.solr.spelling.suggest.Suggester</str>
> <str name="lookupImpl">org.apache.solr.spelling.suggest.fst.FSTLookup</str>
> <str name="field">wordCorpus</str>
> <str name="comparatorClass">score</str>
> <str name="storeDir">./suggester</str>
> <str name="buildOnCommit">false</str>
> <str name="buildOnOptimize">true</str>
> <float name="threshold">0.005</float>
> </lst>
>
> <requestHandler name="/suggest" class="solr.SearchHandler">
> <lst name="defaults">
> <str name="omitHeader">true</str>
> <str name="spellcheck">true</str>
> <str name="spellcheck.onlyMorePopular">true</str>
> <str name="spellcheck.collate">true</str>
> <str name="spellcheck.dictionary">suggestion</str>
> <str name="spellcheck.count">50</str>
> <str name="spellcheck.maxCollations">50</str>
> </lst>
> <arr name="components">
> <str>suggest</str>
> </arr>
> </requestHandler>/
>
> Query like that:
>
>
> http://localhost:8080/solr/core.01/suggest?q=wordPrefix&shards=localhost:8080/solr/core.01,localhost:8080/solr/core.02&shards.qt=/suggest
>
>
> Greetz,
>
> Sebastian
>
>
>
> Tobias Rübner wrote:
> >
> > Hi,
> >
> > I try to use the suggest component (solr 3.3) with multiple cores.
> > I added a search component and a request handler as described in the docs
> > (
> > http://wiki.apache.org/solr/Suggester) to my solrconfig.
> > That works fine for 1 core but querying my solr instance with the shards
> > parameter does not query multiple cores.
> > It just ignores the shards parameter.
> >
> http://localhost:8888/solr/core1/suggest?q=sa&shards=localhost:8888/solr/core1,localhost:8888/solr/core2
> >
> > The documentation of the SpellCheckComponent (
> >
> http://wiki.apache.org/solr/SpellCheckComponent#Distributed_Search_Support
> )
> > is a bit vage in that point, because I don't know if this feature really
> > works with solr 3.3. It is targeted for solr 1.5, which will never come,
> > but
> > says, it is now available.
> > I also tried the shards.qt paramater, but it does not change my results.
> >
> > Thanks for any help,
> > Tobias
> >
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/using-distributed-search-with-the-suggest-component-tp3197651p3200143.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
Re: using distributed search with the suggest component
Posted by mdz-munich <se...@bsb-muenchen.de>.
Hi Tobias,
try this, it works for us (Solr 3.3):
solrconfig.xml:
/<searchComponent name="suggest" class="solr.SpellCheckComponent">
<str name="queryAnalyzerFieldType">word</str>
<lst name="spellchecker">
<str name="name">suggestion</str>
<str name="classname">org.apache.solr.spelling.suggest.Suggester</str>
<str name="lookupImpl">org.apache.solr.spelling.suggest.fst.FSTLookup</str>
<str name="field">wordCorpus</str>
<str name="comparatorClass">score</str>
<str name="storeDir">./suggester</str>
<str name="buildOnCommit">false</str>
<str name="buildOnOptimize">true</str>
<float name="threshold">0.005</float>
</lst>
<requestHandler name="/suggest" class="solr.SearchHandler">
<lst name="defaults">
<str name="omitHeader">true</str>
<str name="spellcheck">true</str>
<str name="spellcheck.onlyMorePopular">true</str>
<str name="spellcheck.collate">true</str>
<str name="spellcheck.dictionary">suggestion</str>
<str name="spellcheck.count">50</str>
<str name="spellcheck.maxCollations">50</str>
</lst>
<arr name="components">
<str>suggest</str>
</arr>
</requestHandler>/
Query like that:
http://localhost:8080/solr/core.01/suggest?q=wordPrefix&shards=localhost:8080/solr/core.01,localhost:8080/solr/core.02&shards.qt=/suggest
Greetz,
Sebastian
Tobias Rübner wrote:
>
> Hi,
>
> I try to use the suggest component (solr 3.3) with multiple cores.
> I added a search component and a request handler as described in the docs
> (
> http://wiki.apache.org/solr/Suggester) to my solrconfig.
> That works fine for 1 core but querying my solr instance with the shards
> parameter does not query multiple cores.
> It just ignores the shards parameter.
> http://localhost:8888/solr/core1/suggest?q=sa&shards=localhost:8888/solr/core1,localhost:8888/solr/core2
>
> The documentation of the SpellCheckComponent (
> http://wiki.apache.org/solr/SpellCheckComponent#Distributed_Search_Support)
> is a bit vage in that point, because I don't know if this feature really
> works with solr 3.3. It is targeted for solr 1.5, which will never come,
> but
> says, it is now available.
> I also tried the shards.qt paramater, but it does not change my results.
>
> Thanks for any help,
> Tobias
>
--
View this message in context: http://lucene.472066.n3.nabble.com/using-distributed-search-with-the-suggest-component-tp3197651p3200143.html
Sent from the Solr - User mailing list archive at Nabble.com.