lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reece <liquidp...@gmail.com>
Subject Re: Ranking search results by content type
Date Wed, 05 Mar 2008 18:01:52 GMT
You could have each doctype correspond to a number that's saved in the
type field, and sort by the number and then score.

Or you can do what I do and when you search, just weight each type
differently.  My types are all just one letter, so for instance:

q=((search string) AND type:A^1) OR ((search string) AND type:B^10) OR etc etc

-Reece


On Wed, Mar 5, 2008 at 10:18 AM, James Wiegand
<originaljimdandy@gmail.com> wrote:
> Hi there,
>
>  What I am trying to do is get search results sorted by content type, since
>  there is an order in which results are preferred, for example:
>
>  * Topics
>  * Postings
>  * Replies
>  * News
>
>  in that order.  The content type is encoded in a "type" field that is stored
>  in the document.
>  Am I right in thinking that I need custom Analyzers to accomplish this or is
>  this something that can be done with a configuration file?
>  Now what I am seeing is the default ranking which only analyzes the
>  significance of the search term, which mixes up the content types.
>  What is the best way to approach a requirement like this?  At the query
>  level, the solr level, or the Lucene level?
>
>  -jim
>
>  --
>  --
>  Jim Wiegand
>  -----------
>  Home: originaljimdandy@gmail.com
>  AIM: originaljimdandy
>  WWW: http://www.netzingers.com
>  Cell: 215 284 8160
>

Mime
View raw message