lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chantal Ackermann <chantal.ackerm...@btelligent.de>
Subject Re: Query filters/analyzers
Date Thu, 01 Oct 2009 11:34:20 GMT
Hi Claudio,

in schema.xml, the <analyzer> element accepts the attribute type.
If you need different analyzer chains during indexing and querying, 
configure it like this:

<fieldType name="channel_name" class="solr.TextField">
	<analyzer type="index">
	<!-- indexing analyzer chain defined here -->
	</analyzer>
	<analyzer type="query">
	<!-- query analyzer chain defined here -->
	</analyzer>
</fieldType>

If there is no difference, just remove one analyzer element and the type 
attribute from the remaining one.

You can check after indexing in the schema browser (admin web frontend) 
what analyzer chain is applied for indexing and querying on a certain field.

When you have detected the input language, simply choose the correct 
field, and the configured analyzer chain for that field will be applied 
automatically.

E.g. input is italian:
q=text-it:input

text-it has the italian analyzers configured for index and query, so to 
the input, the italian analyzers will also be applied.

Cheers,
Chantal

Claudio Martella schrieb:
> Hello list.
> 
> So, i setup my schema.xml with the different chains of analyzers and
> filters for each field (i.e. i created types text-en, text-de, text-it).
> As i have to index documents in different languages, this is good.
> But what defines the analyzers and filters for the query?
> 
> Let's suppose i have my web-app with my input form where you
> fill in the query. I detect the language so i can query the field
> content-en or content-it or content-de according to the detection.
> But how is the query going to be analyzed? Of course i want the query to
> be analyzed accordingly to the field i'm going to search in.
> Where is this defined?
> 
> TIA
> 
> Claudio
> 
> --
> Claudio Martella
> Digital Technologies
> Unit Research & Development - Engineer
> 
> TIS innovation park
> Via Siemens 19 | Siemensstr. 19
> 39100 Bolzano | 39100 Bozen
> Tel. +39 0471 068 123
> Fax  +39 0471 068 129
> claudio.martella@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 privacy@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.
> 
> 

Mime
View raw message