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 Tracey Jaquith <tr...@archive.org> on 2007/01/27 22:12:44 UTC
INTERNET ARCHIVE goes SOLR!
Internet Archive on Monday afternoon switched over to SOLR!
We converted from a badly deteriorating "home grown" server that
was made up of java + jetty ( + rsync for replication) + an older
version of lucene.
I make some comparisons of SOLR vs. "prior" using "[]" notes below.
I parsed 2 days worth of SOLR logs to determine:
Max queries/sec: 8.8
Avg queries/sec: 5.4
Number (re)indexed / day: 3372
Index size: 1.1gb [vs. 26gb]
Number of document fields searched on a quoted unqualified query:
5 [vs. 677] *
Horsepower:
one 4gb RAM dual core cpu
[vs. three 4gb RAM dual core cpu (readers) and one 8gb RAM 2 dual
core cpus (writer)]
Solr hardly touches our disks, load avg stays around 0.5, typically.
"sar" shows we average 85% idle!
Solr seems quicker to respond, overall, and much more stable.
We can reindex our entire set of 575K items in about 2 hours
(where we are limited more by the "crawling" of our 190 servers for
XML than Solr).
With our current configuration, we can show index changes on our live
site in < 15 minutes
(compared to our last SE which could take 4+ hours)
Related to above point, we commit every 15 minutes; we optimize
once/day late at night.
* To be fair, Michael StAck (our greatest help for prior SE "life
support")
has smartly pointed out that by making a smarter schema and strategy,
I could
reduce the number of fields searched from 677 to 5, with the same overall
functionality. 677 fields search on most queries was surely part of
bucket
of nails in the coffin of our prior SE.
[Some information and configuration]
We've done essentially no optimizing outside of focusing on a "smart"
schema.
We do query-time boosting (more on that follows).
We (presently) do not use replication.
We do (server-side) XSLT of output into our prior SE's XML format.
We don't use DisMax and (as of now) do not use faceting.
We override defaultOperator of "OR" to "AND".
We increased our commitLockTimeout to 5 minutes, and unlockOnStartup.
We useCompoundFile (for the index).
External to Solr, we use XSLT to transform our item XML into a
post-able form for Solr to (re)index.
And finally, the hardest part to convert to Solr.
I had to write a PHP front-end custom converter to take our query strings,
parse the clauses and lucene syntax into pieces, and "expand" clauses
where
they were not searching a specific field to expand it to our
query-time boosting.
Eg: if someone were to look for "tracey pooh" on our site, we expand
it to:
(title:"tracey pooh"^100 OR description:"tracey pooh"^15 OR
collection:"tracey pooh"^10 OR language:"tracey pooh"^10 OR text:"tracey
pooh"^1)
(but 'creator:"tracey pooh"' would pass to SOLR as is).
Lastly, a feelgood. All of Internet Archive's written code is opensource,
as is *all* the third-party code we use!
So go SOLR and thank you SO much for keeping it open, keeping it real,
and for *saving our site*!
Thanks for the great mail list and all the continual work, updating,
and thinking the Solr
team continues to do. We have all been greatly impressed by this
project and it has worked out
better than we had hoped!
--
* --Tracey Jaquith - http://www.archive.org/~tracey
<http://www.archive.org/%7Etracey> --*
Re: INTERNET ARCHIVE goes SOLR!
Posted by Chris Hostetter <ho...@fucit.org>.
congrats on the successfull roll-out Tracey,
: We don't use DisMax and (as of now) do not use faceting.
: And finally, the hardest part to convert to Solr.
: I had to write a PHP front-end custom converter to take our query strings,
: parse the clauses and lucene syntax into pieces, and "expand" clauses
: where
: they were not searching a specific field to expand it to our
: query-time boosting.
: Eg: if someone were to look for "tracey pooh" on our site, we expand
: it to:
: (title:"tracey pooh"^100 OR description:"tracey pooh"^15 OR
: collection:"tracey pooh"^10 OR language:"tracey pooh"^10 OR text:"tracey
: pooh"^1)
: (but 'creator:"tracey pooh"' would pass to SOLR as is).
ironicly, using DisMax probably would have let you drasticly reduce
the amount of front end code you need...
if you saw that the input looked like a raw lucene field search, you could
use StandardRequestHandler, or you could split it up - so instead of:
q=creator:"tracey pooh"
...you could use...
qt=dismax & qf=creator & q="tracey pooh"
in the regular input case, instead of:
q=(title:"tracey pooh"^100 OR description:"tracey pooh"^15 OR collection:"tracey pooh"^10 OR language:"tracey pooh"^10 OR text:"tracey pooh"^1)
...you could use...
qt=dismax & tie=1 & qf=title^100 description^15 collection^10 langauge^10 & q="tracey pooh"
...the scores you get back might not be exactly the same, but off the top
of my head i think they'd be pretty darn close (the key in the second case
being the tie=1 so the disjunciton max is really a disjunction sum ... but
i bet if you played with it a bit you'd fine you really don't want the
sum, and you'd rather use a much lower tie breaker value.
-Hoss
Re: INTERNET ARCHIVE goes SOLR!
Posted by Yonik Seeley <yo...@apache.org>.
On 1/29/07, Chris Hostetter <ho...@fucit.org> wrote:
> there is no prefix operator for "OR" so if the default is "AND" there is
> no way at request time to indicate that some clauses should be optional
> without reverting to the ugly and missleading binary operator syntax ...
Perhaps that's something we should add in lucene-land...
Does anyone know of existing syntaxes for "optional" that fit well for +/-
Existing wildcard characters are probably out.
~ perhaps, but it's getting a bit overloaded.
+foo -bar ~baz
-Yonik
Re: INTERNET ARCHIVE goes SOLR!
Posted by Walter Underwood <wu...@netflix.com>.
On 1/29/07 7:46 PM, "Ryan McKinley" <ry...@gmail.com> wrote:
>>
>> Your argument is a good one, and I buy it. However, I've never had a
>> case where a user typing "multiple words" where the expectation was
>> for OR, it is always AND.
>
> But there are many cases where the expectation is to to get the best
> results possible. With AND you get zero results even when there is
> stuff that matches half the query.
This is the exact problem with defaulting to an "all terms" match.
It leaves users stranded with no hits, and only expert searchers
know to try different words or check the spelling.
Google uses "all terms" because it saves them thousands of servers
by cutting down the match space faster. They make up for the
serious usability problems with spelling suggestions. Their
solution for spelling suggestions requires LOTS of data, something
that very, very few sites have.
So even though "Google does it", an AND default is a very bad
idea for nearly all sites.
wunder
--
Walter Underwood
Search Guru, Netflix
Re: INTERNET ARCHIVE goes SOLR!
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Jan 29, 2007, at 11:01 PM, Chris Hostetter wrote:
> if there are cases where DisMax isn't the right choice for raw user
> input
> ... i'm not aware of them, but i'd love to hear about them :)
Ok, ok, ok... I'm a self-admitted dismax avoider thus far. I'll
remedy that by building in dismax capability into solrb and giving it
a whirl. I appreciate the well informed prods to move me into trying
new things.
Erik
Re: INTERNET ARCHIVE goes SOLR!
Posted by Chris Hostetter <ho...@fucit.org>.
: > case where a user typing "multiple words" where the expectation was
: > for OR, it is always AND.
if the input you are passing in comes straight fram a user -- and that
user doesn't understand the Lucene query syntax -- i'd argue
that StandardRequestHandler is the wrong choice, and you should be using
DisMax which solves that problem with the "mm" option (infinitely more
useful in my opinion then making all clauses mandatory in my opinion)
if there are cases where DisMax isn't the right choice for raw user input
... i'm not aware of them, but i'd love to hear about them :)
: But there are many cases where the expectation is to to get the best
: results possible. With AND you get zero results even when there is
: stuff that matches half the query.
Bingo!
-Hoss
Re: INTERNET ARCHIVE goes SOLR!
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Jan 29, 2007, at 10:46 PM, Ryan McKinley wrote:
>>
>> Your argument is a good one, and I buy it. However, I've never had a
>> case where a user typing "multiple words" where the expectation was
>> for OR, it is always AND.
>
> But there are many cases where the expectation is to to get the best
> results possible. With AND you get zero results even when there is
> stuff that matches half the query.
Point taken!
Re: INTERNET ARCHIVE goes SOLR!
Posted by Ryan McKinley <ry...@gmail.com>.
>
> Your argument is a good one, and I buy it. However, I've never had a
> case where a user typing "multiple words" where the expectation was
> for OR, it is always AND.
But there are many cases where the expectation is to to get the best
results possible. With AND you get zero results even when there is
stuff that matches half the query.
Re: INTERNET ARCHIVE goes SOLR!
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Jan 29, 2007, at 6:15 PM, Chris Hostetter wrote:
> : > We override defaultOperator of "OR" to "AND".
> :
> : We really ought to make AND the default anyway.
>
> No, no, no, no, Nooooooooooooo......
:)
Your argument is a good one, and I buy it. However, I've never had a
case where a user typing "multiple words" where the expectation was
for OR, it is always AND. Thanks to it being configurable this is
not a problem with &q.op=AND, though that setting will be in every
app I build (and will be the default in solrb's Request::Standard,
probably).
Erik
> there is no prefix operator for "OR" so if the default is "AND"
> there is
> no way at request time to indicate that some clauses should be
> optional
> without reverting to the ugly and missleading binary operator
> syntax ...
> if the default is "OR" then you *can* add the prefi "+" to indicate
> which
> clauses are mandatory.
>
> I'm fully on board having it configurable and letting people change
> it --
> but OR really should stay the default.
Re: INTERNET ARCHIVE goes SOLR!
Posted by Chris Hostetter <ho...@fucit.org>.
: > We override defaultOperator of "OR" to "AND".
:
: We really ought to make AND the default anyway.
No, no, no, no, Nooooooooooooo......
there is no prefix operator for "OR" so if the default is "AND" there is
no way at request time to indicate that some clauses should be optional
without reverting to the ugly and missleading binary operator syntax ...
if the default is "OR" then you *can* add the prefi "+" to indicate which
clauses are mandatory.
I'm fully on board having it configurable and letting people change it --
but OR really should stay the default.
-Hoss
Re: INTERNET ARCHIVE goes SOLR!
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
Tracey,
Thanks for sharing! This is a fantastic case study. Your
experiences and numbers will certainly be a major sales pitch for
bringing Solr into more organizations.
On Jan 27, 2007, at 4:12 PM, Tracey Jaquith wrote:
> We've done essentially no optimizing outside of focusing on a
> "smart" schema.
Could you elaborate more on the your schema? Or point us to it
somewhere?
> We override defaultOperator of "OR" to "AND".
We really ought to make AND the default anyway.
> Lastly, a feelgood. All of Internet Archive's written code is
> opensource,
Where can we find this code?
> So go SOLR and thank you SO much for keeping it open, keeping it
> real, and for *saving our site*!
Our pleasure :) Kudos to Yonik and Hoss primarily, of course.
> Thanks for the great mail list and all the continual work,
> updating, and thinking the Solr
> team continues to do. We have all been greatly impressed by this
> project and it has worked out
> better than we had hoped!
Tell Brewster I said hello :) [I chatted with him in person at OSCON
about Lucene, once upon a time]
Erik
Re: INTERNET ARCHIVE goes SOLR!
Posted by Tracey Jaquith <tr...@archive.org>.
oh, tee hee if if our eternal admiration and gratitude isn't obvious... 8-)
i concur, the amount one *can* customize simply from the XML configuration
and schema is fantastically impressive! almost all of the configuration
setup it is quick to do in our experience, too
--tracey
Walter Underwood wrote:
> On 1/27/07 1:12 PM, "Tracey Jaquith" <tr...@archive.org> wrote:
>
>> * To be fair, Michael StAck (our greatest help for prior SE "life support")
>> has smartly pointed out that by making a smarter schema and strategy,
>> I could reduce the number of fields searched from 677 to 5, with the
>> same overall functionality. 677 fields search on most queries was
>> surely part of bucket of nails in the coffin of our prior SE.
>>
>
> Solr makes it so easy to understand and change fields that I would
> be inclined to still give some credit to Solr for making the faster
> config easier to achieve.
>
> wunder
>
>
--
* --Tracey Jaquith - http://www.archive.org/~tracey
<http://www.archive.org/%7Etracey> --*
Re: INTERNET ARCHIVE goes SOLR!
Posted by Walter Underwood <wu...@netflix.com>.
On 1/27/07 1:12 PM, "Tracey Jaquith" <tr...@archive.org> wrote:
>
> * To be fair, Michael StAck (our greatest help for prior SE "life support")
> has smartly pointed out that by making a smarter schema and strategy,
> I could reduce the number of fields searched from 677 to 5, with the
> same overall functionality. 677 fields search on most queries was
> surely part of bucket of nails in the coffin of our prior SE.
Solr makes it so easy to understand and change fields that I would
be inclined to still give some credit to Solr for making the faster
config easier to achieve.
wunder