As Ahmet says, this is what dismax does. You could also append a
filter query (fq=crawl:DIGITALDATA) to your query.

eDismax supports fielded queries, see:
https://issues.apache.org/jira/browse/SOLR-1553

This is already in the trunk and 3.x code lines I'm pretty sure.

Best
Erick

On Mon, Jan 17, 2011 at 12:15 PM, Claudio Martella <
claudio.marte...@tis.bz.it> wrote:

> Thanks for your answer.
>
> Yes, schema browser shows that the field contains the right values as i
> expect.
> From debugQuery=on i see there must be some problem though:
>
> <str name="rawquerystring">crawl:DIGITALDATA</str>
>  <str name="querystring">crawl:DIGITALDATA</str>
>  <str name="parsedquery">+DisjunctionMaxQuery((contentEN:"crawl
> (digitaldata crawldigitaldata)"^0.8 | title:"crawl (digitaldata
> crawldigitaldata)"^1.2 | url:"crawl digitaldata"^1.5 | contentDE:"crawl
> (digitaldata crawldigitaldata)"^0.8 | contentIT:"crawl (digitald
> crawldigitald)"^0.8 | anchor:crawl:DIGITALDATA^1.5)~0.1)
> DisjunctionMaxQuery((contentEN:"crawl (digitaldata
> crawldigitaldata)"^0.8 | title:"crawl (digitaldata
> crawldigitaldata)"^1.2 | url:"crawl digitaldata"^1.5 | contentDE:"crawl
> (digitaldata crawldigitaldata)"^0.8 | contentIT:"crawl (digitald
> crawldigitald)"^0.8 | anchor:crawl:DIGITALDATA^1.5)~0.1)</str>
>  <str name="parsedquery_toString">+(contentEN:"crawl (digitaldata
> crawldigitaldata)"^0.8 | title:"crawl (digitaldata
> crawldigitaldata)"^1.2 | url:"crawl digitaldata"^1.5 | contentDE:"crawl
> (digitaldata crawldigitaldata)"^0.8 | contentIT:"crawl (digitald
> crawldigitald)"^0.8 | anchor:crawl:DIGITALDATA^1.5)~0.1
> (contentEN:"crawl (digitaldata crawldigitaldata)"^0.8 | title:"crawl
> (digitaldata crawldigitaldata)"^1.2 | url:"crawl digitaldata"^1.5 |
> contentDE:"crawl (digitaldata crawldigitaldata)"^0.8 | contentIT:"crawl
> (digitald crawldigitald)"^0.8 | anchor:crawl:DIGITALDATA^1.5)~0.1</str>
>
> It looks like there's some problem with my dismax query handler. It
> doesn't recognize the query with the colon format.
> Here's the handler definition:
>
> <requestHandler name="/content" class="solr.SearchHandler" default="true">
> <lst name="defaults">
>   <str name="defType">dismax</str>
>   <str name="pf">title^1.2 anchor^1.5 url^1.5 contentEN^0.8
> contentIT^0.8 contentDE^0.8</str>
>   <str name="qf">title^1.2 anchor^1.5 url^1.5 contentEN^0.8
> contentIT^0.8 contentDE^0.8</str>
>   <float name="tie">0.1</float>
>   <bool name="hl">true</bool>
>   <str name="hl.fl">title url content anchor</str>
>   <int name="hl.fragsize">150</int>
>   <int name="hl.snippets">3</int>
>   <bool name="hl.mergeContiguous">true</bool>
> </lst>
> </requestHandler>
>
>
>
> On 1/17/11 6:06 PM, Erick Erickson wrote:
> > String fields are unanalyzed, so case matters. Are you sure you're not
> > using a different case (try KeywordTokenizer + lowercaseFilter if you
> > want these normalized to, say, lower case).
> >
> > If that isn't the problem, could we see the results if you add
> > &debugQuery=on
> > to your URL? That often helps diagnose the problem.
> >
> > Take a look at your solr/admin page, "schema browser" to examine the
> actual
> > contents of the "crawl" field and see if they're really what you expect.
> >
> > Best
> > Erick
> >
> > On Mon, Jan 17, 2011 at 11:59 AM, Claudio Martella <
> > claudio.marte...@tis.bz.it> wrote:
> >
> >> Hi,
> >>
> >> I'm crawling different intranets so i developed a nutch plugin to add a
> >> static field for each of these crawls.
> >> I do have now in SOLR my documents with their specific "craw" field. If
> >> i search withing solr i can see my documents being returned with that
> >> field.
> >>
> >> The field definition in the schema is:
> >>
> >> <field name="crawl" type="string" stored="true" indexed="true"/>
> >>
> >> I'd like to put a checkbox in my websearch app to choose with partition
> >> to search in. So i thought i'd implement it by simply using:
> >>
> >> /select?indent=on&version=2.2&q=crawl%3Avalue+AND+query but nothing is
> >> returned. I also just tried crawl:value, which i'd expect to return all
> >> the documents from that crawl, but no results are sent back. As the
> >> field is indexed and stored and i can see the documents owning that
> >> field from normal query results, what could i be missing?
> >>
> >> --
> >> Claudio Martella
> >> Digital Technologies
> >> Unit Research & Development - Analyst
> >>
> >> TIS innovation park
> >> Via Siemens 19 | Siemensstr. 19
> >> 39100 Bolzano | 39100 Bozen
> >> Tel. +39 0471 068 123
> >> Fax  +39 0471 068 129
> >> claudio.marte...@tis.bz.it http://www.tis.bz.it
> >>
> >> Short information regarding use of personal data. According to Section
> 13
> >> of Italian Legislative Decree no. 196 of 30 June 2003, we inform you
> that we
> >> process your personal data in order to fulfil contractual and fiscal
> >> obligations and also to send you information regarding our services and
> >> events. Your personal data are processed with and without electronic
> means
> >> and by respecting data subjects' rights, fundamental freedoms and
> dignity,
> >> particularly with regard to confidentiality, personal identity and the
> right
> >> to personal data protection. At any time and without formalities you can
> >> write an e-mail to priv...@tis.bz.it in order to object the processing
> of
> >> your personal data for the purpose of sending advertising materials and
> also
> >> to exercise the right to access personal data and other rights referred
> to
> >> in Section 7 of Decree 196/2003. The data controller is TIS Techno
> >> Innovation Alto Adige, Siemens Street n. 19, Bolzano. You can find the
> >> complete information on the web site www.tis.bz.it.
> >>
> >>
> >>
>
>
> --
> Claudio Martella
> Digital Technologies
> Unit Research & Development - Analyst
>
> TIS innovation park
> Via Siemens 19 | Siemensstr. 19
> 39100 Bolzano | 39100 Bozen
> Tel. +39 0471 068 123
> Fax  +39 0471 068 129
> claudio.marte...@tis.bz.it http://www.tis.bz.it
>
> Short information regarding use of personal data. According to Section 13
> of Italian Legislative Decree no. 196 of 30 June 2003, we inform you that we
> process your personal data in order to fulfil contractual and fiscal
> obligations and also to send you information regarding our services and
> events. Your personal data are processed with and without electronic means
> and by respecting data subjects' rights, fundamental freedoms and dignity,
> particularly with regard to confidentiality, personal identity and the right
> to personal data protection. At any time and without formalities you can
> write an e-mail to priv...@tis.bz.it in order to object the processing of
> your personal data for the purpose of sending advertising materials and also
> to exercise the right to access personal data and other rights referred to
> in Section 7 of Decree 196/2003. The data controller is TIS Techno
> Innovation Alto Adige, Siemens Street n. 19, Bolzano. You can find the
> complete information on the web site www.tis.bz.it.
>
>
>

Reply via email to