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 Howard Lee <ho...@workdigital.co.uk> on 2008/04/25 17:44:29 UTC
Help required with external value source SOLR-351
Help required with external value source SOLR-351
I'm trying to get this new feature to work without much success. I've
completed the following steps.
1) dowloaded latest nightly build
2) added the following to schema.xml
<fieldtype name="file" keyField="job_id" defVal="1" stored="false"
indexed="false" class="solr.ExternalFileField" valType="float"/>
and
<field name="cpc" type="file"/>
3) Created a file in the solr index folder - "external_cpc" with the
following entries
4901708=10
4901715=20
The ids correspond to job_id ids in the index.
when I run a query _val_:cpc the max score just corresponds to the defval 1.
It doesn't seem to be picking up anything from the external file.
from a query
job_id:4901708 _val_:cpc
In the explain I get
FunctionQuery(FileFloatSource(field=cpc,keyField=job_id,defVal=1.0,dataDir=D:/solr1/data/)),
product of:
1.0 = float(cpc{type=file,properties=})=1.0
1.0 = boost
what am I doing wrong?
Thanks
Howard
Re: Help required with external value source SOLR-351
Posted by Koji Sekiguchi <ko...@r.email.ne.jp>.
Howard,
I think up two things:
1. double check external_cpc file is in D:/solr1/data there
and post <commit/> to let solr read it.
2. DisMax query doesn't support "job_id:4901708 _val_:cpc" format
for query string. Just try q=cpc and see explain.
Thank you,
Koji
Howard Lee wrote:
> Help required with external value source SOLR-351
>
> I'm trying to get this new feature to work without much success. I've
> completed the following steps.
>
> 1) dowloaded latest nightly build
> 2) added the following to schema.xml
> <fieldtype name="file" keyField="job_id" defVal="1" stored="false"
> indexed="false" class="solr.ExternalFileField" valType="float"/>
>
> and
>
> <field name="cpc" type="file"/>
>
> 3) Created a file in the solr index folder - "external_cpc" with the
> following entries
> 4901708=10
> 4901715=20
>
> The ids correspond to job_id ids in the index.
>
> when I run a query _val_:cpc the max score just corresponds to the defval 1.
> It doesn't seem to be picking up anything from the external file.
>
> from a query
>
> job_id:4901708 _val_:cpc
>
> In the explain I get
>
> FunctionQuery(FileFloatSource(field=cpc,keyField=job_id,defVal=1.0,dataDir=D:/solr1/data/)),
> product of:
> 1.0 = float(cpc{type=file,properties=})=1.0
> 1.0 = boost
>
> what am I doing wrong?
>
> Thanks
>
> Howard
>
>