You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Paulo Silveira <pa...@caelum.com.br> on 2007/05/25 09:32:39 UTC

Writing a document using two different Analyzers

Hello!

I have a Document with tow fields: one I would like to write with
SimpleAnalyzer, the other I want to use StandardAnalyzer, is there a
simple way to do it?

thanks

-- 
Paulo E. A. Silveira
Caelum Ensino e Soluções em Java
http://www.caelum.com.br/

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Writing a document using two different Analyzers

Posted by Erick Erickson <er...@gmail.com>.
Assuming you've got two analyzers <G>...just see the javadoc for
PerFieldAnalyzerWrapper. It's pretty easy once you have the
magic class name.......


Best
Erick

On 6/19/07, Sebastin <se...@gmail.com> wrote:
>
>
> could you briefly tell me how to write two analyzers for the two field
>
> Paulo Silveira-3 wrote:
> >
> > On 5/25/07, karl wettin <ka...@gmail.com> wrote:
> >>
> >> PerFieldAnalyzerWrapper
> >>
> >
> > that was fast! thanks!
> >
> >
> >> http://lucene.zones.apache.org:8080/hudson/job/Lucene-Nightly/javadoc/
> >> org/apache/lucene/analysis/PerFieldAnalyzerWrapper.html
> >>
> >> --
> >> karl
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> >> For additional commands, e-mail: java-user-help@lucene.apache.org
> >>
> >>
> >
> >
> > --
> > Paulo E. A. Silveira
> > Caelum Ensino e Soluções em Java
> > http://www.caelum.com.br/
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> > For additional commands, e-mail: java-user-help@lucene.apache.org
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Writing-a-document-using-two-different-Analyzers-tf3814647.html#a11194791
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

Re: Writing a document using two different Analyzers

Posted by Sebastin <se...@gmail.com>.
could you briefly tell me how to write two analyzers for the two field

Paulo Silveira-3 wrote:
> 
> On 5/25/07, karl wettin <ka...@gmail.com> wrote:
>>
>> PerFieldAnalyzerWrapper
>>
> 
> that was fast! thanks!
> 
> 
>> http://lucene.zones.apache.org:8080/hudson/job/Lucene-Nightly/javadoc/
>> org/apache/lucene/analysis/PerFieldAnalyzerWrapper.html
>>
>> --
>> karl
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>
> 
> 
> -- 
> Paulo E. A. Silveira
> Caelum Ensino e Soluções em Java
> http://www.caelum.com.br/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Writing-a-document-using-two-different-Analyzers-tf3814647.html#a11194791
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Writing a document using two different Analyzers

Posted by Paulo Silveira <pa...@caelum.com.br>.
On 5/25/07, karl wettin <ka...@gmail.com> wrote:
>
> PerFieldAnalyzerWrapper
>

that was fast! thanks!


> http://lucene.zones.apache.org:8080/hudson/job/Lucene-Nightly/javadoc/
> org/apache/lucene/analysis/PerFieldAnalyzerWrapper.html
>
> --
> karl
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>


-- 
Paulo E. A. Silveira
Caelum Ensino e Soluções em Java
http://www.caelum.com.br/

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Number of documents in an index with filter

Posted by Joe MarkAnthony <mr...@comcast.net>.
Greetings,

I would like to add the number of possible hits in my queries, for example,
"found 18 hits out of a possible 245,000 documents".  I am assuming that
IndexReader.numDocs() is the best way to get this value.

However, I would like to use a filter as part of the query.  What is the
most efficient way to get the total number of documents given a filter on a
query?

Thanks,
J


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Writing a document using two different Analyzers

Posted by karl wettin <ka...@gmail.com>.
25 maj 2007 kl. 09.32 skrev Paulo Silveira:

>
> I have a Document with tow fields: one I would like to write with
> SimpleAnalyzer, the other I want to use StandardAnalyzer, is there a
> simple way to do it?

PerFieldAnalyzerWrapper

http://lucene.zones.apache.org:8080/hudson/job/Lucene-Nightly/javadoc/ 
org/apache/lucene/analysis/PerFieldAnalyzerWrapper.html

-- 
karl

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org