Ranking position in solr

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Ranking position in solr

Chamnap Chhorn
I wonder there is a proper way to fulfill this requirement. A book has
several keyphrases. Each keyphrase consists from one word to 3 words. The
author could either buy keyphrase position or don't buy position. Note: each
author could buy more than 1 keyphrase. The keyphrase search must be exact
and case sensitive.

For example: Book A, keyphrases: agile, web, development Book B, keyphrases:
css, html, web

Let's say Author of Book A buys search result position 1 with keyphrase
"web", so his book should be in the first position. His book should be
listed before the Book B.

Anyone has any suggestions on how to implement this in solr?

--
Chhorn Chamnap
http://chamnapchhorn.blogspot.com/
Reply | Threaded
Open this post in threaded view
|

Re: Ranking position in solr

iorixxx
> I wonder there is a proper way to
> fulfill this requirement. A book has
> several keyphrases. Each keyphrase consists from one word
> to 3 words. The
> author could either buy keyphrase position or don't buy
> position. Note: each
> author could buy more than 1 keyphrase. The keyphrase
> search must be exact
> and case sensitive.
>
> For example: Book A, keyphrases: agile, web, development
> Book B, keyphrases:
> css, html, web
>
> Let's say Author of Book A buys search result position 1
> with keyphrase
> "web", so his book should be in the first position. His
> book should be
> listed before the Book B.
>
> Anyone has any suggestions on how to implement this in
> solr?

http://wiki.apache.org/solr/QueryElevationComponent - which is used to "elevate" results based on editorial decisions - may help.


     
Reply | Threaded
Open this post in threaded view
|

Re: Ranking position in solr

Chamnap Chhorn
The problem is that every time I update the elevate.xml, I need to restart
solr tomcat service. This feature needs to be updated frequently. How would
i handle that?

Any idea or other solutions?

On Mon, Jul 12, 2010 at 5:45 PM, Ahmet Arslan <[hidden email]> wrote:

> > I wonder there is a proper way to
> > fulfill this requirement. A book has
> > several keyphrases. Each keyphrase consists from one word
> > to 3 words. The
> > author could either buy keyphrase position or don't buy
> > position. Note: each
> > author could buy more than 1 keyphrase. The keyphrase
> > search must be exact
> > and case sensitive.
> >
> > For example: Book A, keyphrases: agile, web, development
> > Book B, keyphrases:
> > css, html, web
> >
> > Let's say Author of Book A buys search result position 1
> > with keyphrase
> > "web", so his book should be in the first position. His
> > book should be
> > listed before the Book B.
> >
> > Anyone has any suggestions on how to implement this in
> > solr?
>
> http://wiki.apache.org/solr/QueryElevationComponent - which is used to
> "elevate" results based on editorial decisions - may help.
>
>
>
>


--
Chhorn Chamnap
http://chamnapchhorn.blogspot.com/
Reply | Threaded
Open this post in threaded view
|

Re: Ranking position in solr

Markus Jelsma
No, it can build for each new searcher [1].

[1]: http://wiki.apache.org/solr/QueryElevationComponent#config-file


On Tuesday 13 July 2010 11:02:10 Chamnap Chhorn wrote:

> The problem is that every time I update the elevate.xml, I need to restart
> solr tomcat service. This feature needs to be updated frequently. How would
> i handle that?
>
> Any idea or other solutions?
>
> On Mon, Jul 12, 2010 at 5:45 PM, Ahmet Arslan <[hidden email]> wrote:
> > > I wonder there is a proper way to
> > > fulfill this requirement. A book has
> > > several keyphrases. Each keyphrase consists from one word
> > > to 3 words. The
> > > author could either buy keyphrase position or don't buy
> > > position. Note: each
> > > author could buy more than 1 keyphrase. The keyphrase
> > > search must be exact
> > > and case sensitive.
> > >
> > > For example: Book A, keyphrases: agile, web, development
> > > Book B, keyphrases:
> > > css, html, web
> > >
> > > Let's say Author of Book A buys search result position 1
> > > with keyphrase
> > > "web", so his book should be in the first position. His
> > > book should be
> > > listed before the Book B.
> > >
> > > Anyone has any suggestions on how to implement this in
> > > solr?
> >
> > http://wiki.apache.org/solr/QueryElevationComponent - which is used to
> > "elevate" results based on editorial decisions - may help.
>

Markus Jelsma - Technisch Architect - Buyways BV
http://www.linkedin.com/in/markus17
050-8536620 / 06-50258350

Reply | Threaded
Open this post in threaded view
|

Re: Ranking position in solr

iorixxx
In reply to this post by Chamnap Chhorn
> The problem is that every time I
> update the elevate.xml, I need to restart
> solr tomcat service. This feature needs to be updated
> frequently. How would
> i handle that?

You can reload core, without restarting tomcat, if you are using multi-core setup. Which version of solr are you using?


     
Reply | Threaded
Open this post in threaded view
|

Re: Ranking position in solr

Chamnap Chhorn
I'm using solr 1.4 and only one core. The elevate xml file is quite big, and
i wonder can solr handle that? How to reload the core?

On Tue, Jul 13, 2010 at 4:12 PM, Ahmet Arslan <[hidden email]> wrote:

> > The problem is that every time I
> > update the elevate.xml, I need to restart
> > solr tomcat service. This feature needs to be updated
> > frequently. How would
> > i handle that?
>
> You can reload core, without restarting tomcat, if you are using multi-core
> setup. Which version of solr are you using?
>
>
>
>


--
Chhorn Chamnap
http://chamnapchhorn.blogspot.com/
Reply | Threaded
Open this post in threaded view
|

Re: Ranking position in solr

iorixxx
> I'm using solr 1.4 and only one core.
> The elevate xml file is quite big, and
> i wonder can solr handle that? How to reload the core?

Markus Jelsma's suggestion is more robust. You don't need to restart or reload anything. Put elevate.xml under data directory. It will reloaded automatically after every commit or optimize.


     
Reply | Threaded
Open this post in threaded view
|

Re: Ranking position in solr

Chamnap Chhorn
I sent this command: curl http://localhost:8081/solr/update -F stream.body='
<commit />', but it doesn't reload.

It doesn't reload automatically after every commit or optimize unless I add
new document then i commit.

Any idea?

On Tue, Jul 13, 2010 at 4:54 PM, Ahmet Arslan <[hidden email]> wrote:

> > I'm using solr 1.4 and only one core.
> > The elevate xml file is quite big, and
> > i wonder can solr handle that? How to reload the core?
>
> Markus Jelsma's suggestion is more robust. You don't need to restart or
> reload anything. Put elevate.xml under data directory. It will reloaded
> automatically after every commit or optimize.
>
>
>
>


--
Chhorn Chamnap
http://chamnapchhorn.blogspot.com/
Reply | Threaded
Open this post in threaded view
|

Re: Ranking position in solr

iorixxx
In reply to this post by Chamnap Chhorn
> I sent this command: curl http://localhost:8081/solr/update -F stream.body='
> <commit />', but it doesn't reload.
>
> It doesn't reload automatically after every commit or
> optimize unless I add
> new document then i commit.

Hmm. May be there is an easier way to force it? (add empty/dummy doc)
But if you are okey with the core reload/restart you can use this custom code to do it. You need to register this in solrconfig.xml.

If you don't want to use custom code you need to use http://wiki.apache.org/solr/CoreAdmin#RELOAD

public class DummyRequestHandler extends RequestHandlerBase {

    public void handleRequestBody(SolrQueryRequest req, SolrQueryResponse rsp) throws Exception {
        try {
            req.getCore().getCoreDescriptor().getCoreContainer().reload("");
            rsp.add("message", "core reloaded successfully");
        } catch (final Throwable t) {
            rsp.add("message", t.getMessage());
        }
    }