mentby.com
Blog | Jobs | Help | Signup | Login

loading
: Well IndexSearcher doesn't have a constructor that accepts a string,
: maybe you should pass in an indexreader instead?

speciically: the code you are trying to run was compiled against a version
of lucene in which the IndexSearcher class had a constructor that accepted
a single string argument -- but at runtime, the classpath you are using
contains a compiled version of the IndexSearcher class where that
constructor does not exist.

the likely sitaution is that your code was compiled with an older version
of lucene (once upone a time IndexSearcher had a constructor that took a
String argument) and you are now running that code against a newer version
of lucene.  Alternatively: it's possible you have many versions of lucene
in your classpath, and the JVM is getting confused.

-Hoss
: At index time I boost the alias field of a small set of documents, setting the
: boost to 2.0f, which I thought meant equivalent to doubling the score this doc
: would get over another doc, everything else being equal.

1) you haven't shown us enough details to be certian, but based on the
code you've provied it looks like you are adding a boost for *each* field
instance named "alias" if the value of artistGuid is in your
artistGuIdSet...

:         if(artistGuIdSet.contains(artistGuid)) {
:             for(IndexableField indexablefield:doc.getFields())
:             {
: if(indexablefield.name().equals(ArtistIndexField.ALIAS.getName()))
:                 {
:                     Field field = (Field)indexablefield;
:                     field.setBoost(ARTIST_DOC_BOOST);

...so a doc with N values in the "alias" field is going to get a field
boost of N*2.

2) Looking at the URL you mentioned

:  http://search.musicbrainz.org/?type=artist&query=Jean&am[..]

...the debug explanation currently produced by that URL says...

6.4894321E10 = (MATCH) weight(alias:jean in 7610) [MusicbrainzSimilarity], result of:
   7.5161928E9 = fieldNorm(doc=7610)

ou need to look at your "MusicbrainzSimilarity" class and it's fieldNorm
method to determine for certain why it's producing such large values.  we
have no idea how that's implemented.

-Hoss
: Thank you very much Arjen. I had to separately download and install the
: jar.  it was not present in my lucene installation directory. I had
: downloaded the lucene zip file and ran the command  "ant" after extracting
: it. Did i miss anything.?

if you download & build lucene from source, then:

1) the lucene-analyzers-common code would be in the analysis/common module

2) running "ant" defaults to only building lucene-core.  if you want to
build all of the modules as well you need to run "ant jar"

-Hoss
Group(s)
Profile Widget
Copy and paste this HTML code to your blog or website: