thank you very much. it's good for me.

--- 12年7月10日,周二, feng lu [via Lucene] 
<ml-node+s472066n3994094...@n3.nabble.com> 写道:

发件人: feng lu [via Lucene] <ml-node+s472066n3994094...@n3.nabble.com>
主题: Re: about some seacher(I'm new hand, thank you for help)
收件人: "sam" <hairen...@yahoo.com.cn>
日期: 2012年7月10日,周二,下午4:25



        hi sam


you can add content and time stamp field like this.


// add content

 doc.add(new Field("contents", content,Field.Store.NO,Field.Index.ANALYZED);

 // add timestamp

 NumericField timestampField = new NumericField("timestamp");

 timestampField.setLongValue(DateField.stringToTime(timestamp));

 doc.add(timestampField);


To perform range querying or filtering against a NumericField, use

NumericRangeQuery or NumericRangeFilter. you can see the

http://wiki.apache.org/lucene-java/SearchNumericalFields to find any useful

information.


On Tue, Jul 10, 2012 at 3:38 PM, sam <[hidden email]> wrote:


> timestamp





-- 

Don't Grow Old, Grow Up... :-)


        
        

        

        
        
                If you reply to this email, your message will be added to the 
discussion below:
                
http://lucene.472066.n3.nabble.com/about-some-seacher-I-m-new-hand-thank-you-for-help-tp3993397p3994094.html
        
        
                
                To unsubscribe from about some seacher(I'm new hand, thank you 
for help), click here.

                NAML
        

--
View this message in context: 
http://lucene.472066.n3.nabble.com/about-some-seacher-I-m-new-hand-thank-you-for-help-tp3993397p3994102.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.

Reply via email to