lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tomás Fernández Löbbe <tomasflo...@gmail.com>
Subject Re: Can Solr solve this simple problem?
Date Mon, 16 Apr 2012 22:42:50 GMT
I'm wondering if Solr is the best tool for this kind of usage. Solr is a
"text search engine", so even if it supports all those features, it is
design for text search, which doesn't seem to be what you need. Which are
the reasons for moving from a DB implementation to Solr?

Don't misunderstand me, I really like Solr and it is a really cool hammer,
but not everything is a nail. I would really like to hear more opinions on
this.


Tomás


On Mon, Apr 16, 2012 at 7:12 PM, Jan Høydahl <jan.asf@cominvent.com> wrote:

> > Hi everyone :)
>
> Hi :)
>
> > So, these are my 3 questions:
> > 1. Does Solr provide searching among different count fields with
> different
> > types like in WHERE condition?
>
> Yes. As long as these are not full-text you should use filter queries for
> these, e.g.
> &q=*:*
> &fq=country:USA
> &fq=language:SPA
> &fq=age:[30 TO 40]
> &fq=(bool_field1:1 OR bool_field2:1)
>
> The reason why I put multiple "fq" instead of one long is to optimize for
> caching of filters
>
> > 2. Does Solr provide such sorting, that depends on other fields (like
> sums
> > in ORDER BY), other words - does it provide any kind of function, which
> is
> > used to sort results from q1?
>
> Yes. In trunk version you can sort by function which can do sums and all
> crezy things
> &sort=sum(product(has_photo,10),if(exists(query($agequery)),50,0))
> asc&agequery=age:[53 TO *]
> See http://wiki.apache.org/solr/FunctionQuery for more functions
>
> But you could also to much of this through boost queries
> &sort=score desc
> &bq=language:FRA^50
> %bq=age:[53 TO *]^20
>
> > 3. Does Solr provide realtime index updating or updating every N minutes?
>
> Sure, there is Near Real-time indexing in TRUNK (coming 4.0)
>
> Jan

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message