lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Rödig ...@shi-gmbh.com>
Subject AW: search by url in Solr?
Date Wed, 11 May 2011 06:46:54 GMT
Hello,

if you want to have more than one searchfield, you can use the Dismax or eDismax Queryparser.
There you can set more than one field to search.
Example:
<requestHandler name="standard" class="solr.SearchHandler" default="true">
	<lst name="defaults">
		<str name="defType">dismax</str>
		<str name="echoParams">explicit</str>
		<str name="fl">*,score</str>
		<str name="qf">text^1.0 title^0.05 author^0.2 shi_quelle^0.4 shi_year adrp_keywords^0.5
shi_path^2.0</str>
		...

Qf are the Query fields in wich the parser will search.
The numbers with the ^ are boost Factors.

The Dismax have many more nice features look at it on http://wiki.apache.org/solr/DisMaxQParserPlugin

Mit freundlichen Grüßen
M.Sc. Dipl.-Inf. (FH) Martin Rödig
 
SHI Elektronische Medien GmbH

Postadresse: Watzmannstr. 23, 86316 Friedberg
Besuchsadresse: Curt-Frenzel-Str. 12, 86167 Augsburg
Tel.: 0821 7482633 18
Tel.: 0821 7482633 0 (Zentrale)
Fax: 0821 7482633 29

Internet: http://www.shi-gmbh.com
Registergericht Augsburg HRB 17382
Geschäftsführer: Peter Spiske
Steuernummer: 103/137/30412

-----Ursprüngliche Nachricht-----
Von: Anurag [mailto:anurag.it.jolly@gmail.com] 
Gesendet: Mittwoch, 11. Mai 2011 07:05
An: solr-user@lucene.apache.org
Betreff: Re: search by url in Solr?

thanks! , it worked.
Can i mention
 <defaultSearchField>url,content</
defaultSearchField>
to inlcude two default fields.?

On Wed, May 11, 2011 at 3:02 AM, Rakudten [via Lucene] <
ml-node+2924686-576776982-146354@n3.nabble.com> wrote:

> Hello.
>
> One option is to specify a default search field in your schema.xml. If 
> your
>
> query doesn´t include an specific field the query parser will use the 
> default one to launch the query. You should include in your schema.xml 
> something like this:
>
>
>     <!-- field for the QueryParser to use when an explicit fieldname 
> is absent -->
>
>  <defaultSearchField>url</defaultSearchField>
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the 
> discussion
> below:
>
> http://lucene.472066.n3.nabble.com/search-by-url-in-Solr-tp2924632p292
> 4686.html  To unsubscribe from search by url in Solr?, click 
> here<http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=2924632&code=YW51cmFnLml0LmpvbGx5QGdtYWlsLmNvbXwyOTI0NjMyfC0yMDk4MzQ0MTk2>.
>
>



--
Kumar Anurag


-----
Kumar Anurag

--
View this message in context: http://lucene.472066.n3.nabble.com/search-by-url-in-Solr-tp2924632p2926107.html
Sent from the Solr - User mailing list archive at Nabble.com.
Mime
View raw message