Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Lucene: Java-User

analyzer per document

 

 

Lucene java-user RSS feed   Index | Next | Previous | View Threaded


vthimmappa at ariba

Feb 9, 2012, 4:01 AM

Post #1 of 3 (150 views)
Permalink
analyzer per document

Hello All,

I have a requirement of using different analyzer per document. How can
we do this?

My analyzer would be locale specific.

I have a file with 10 lines, each with different language. Document
would be one line and I want analyzer to be changed based on the locale
of the line. Is this possible to do ?

Thanks
Vinaya


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe [at] lucene
For additional commands, e-mail: java-user-help [at] lucene


flozano at gmail

Feb 9, 2012, 4:11 AM

Post #2 of 3 (153 views)
Permalink
Re: analyzer per document [In reply to]

Why don't you store each "file" in a single document, add a field for
each "line" and use a PerFieldAnalyzerWrapper?

Francisco A. Lozano



On Thu, Feb 9, 2012 at 13:01, Vinaya Kumar Thimmappa
<vthimmappa [at] ariba> wrote:
> Hello All,
>
> I have a requirement of using different analyzer per document. How can
> we do this?
>
> My analyzer would be locale specific.
>
> I have a file with 10 lines, each with different language. Document
> would be one line and I want analyzer to be changed based on the locale
> of the line. Is this possible to do ?
>
> Thanks
> Vinaya
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe [at] lucene
> For additional commands, e-mail: java-user-help [at] lucene
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe [at] lucene
For additional commands, e-mail: java-user-help [at] lucene


paul at hoplahup

Feb 9, 2012, 6:11 AM

Post #3 of 3 (149 views)
Permalink
Re: analyzer per document [In reply to]

I would use a different field per language and use PerFieldAnalyzer indeed.
This is also important for queries whose language is not always clear.

paul


Le 9 févr. 2012 à 13:01, Vinaya Kumar Thimmappa a écrit :

> Hello All,
>
> I have a requirement of using different analyzer per document. How can
> we do this?
>
> My analyzer would be locale specific.
>
> I have a file with 10 lines, each with different language. Document
> would be one line and I want analyzer to be changed based on the locale
> of the line. Is this possible to do ?
>
> Thanks
> Vinaya
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe [at] lucene
> For additional commands, e-mail: java-user-help [at] lucene
>


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe [at] lucene
For additional commands, e-mail: java-user-help [at] lucene

Lucene java-user RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.