Re: about some seacher(I'm new hand, thank you for help)

2012-07-10 Thread sam
thank you very much. it's good for me. --- 12年7月10日,周二, feng lu [via Lucene] 写道: 发件人: feng lu [via Lucene] 主题: Re: about some seacher(I'm new hand, thank you for help) 收件人: "sam" 日期: 2012年7月10日,周二,下午4:25 hi sam you can add content and time stamp field like th

Re: about some seacher(I'm new hand, thank you for help)

2012-07-10 Thread feng lu
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));

Re: about some seacher(I'm new hand, thank you for help)

2012-07-10 Thread sam
but,how can i used it in lucene File logFile= new File("D:\\logFile"); BufferedReader reader=null; String str = null; reader = new BufferedReader(new FileReader(logFile)); while

Re: about some seacher(I'm new hand, thank you for help)

2012-07-09 Thread Ian Lea
You don't know how to split the string containing the data you want to index?? String s = "2012-07-06 11:11:43some message"; String timestamp = s.substring(0, 19); String content = s.substring(19).trim(); is one way. -- Ian. On Mon, Jul 9, 2012 at 3:55 AM, sam wro

Re: about some seacher(I'm new hand, thank you for help)

2012-07-08 Thread sam
But i don't konw how to split this two data,this is the piont.would you mind writing down some codes to show that?thank you very much ! -- View this message in context: http://lucene.472066.n3.nabble.com/about-some-seacher-I-m-new-hand-thank-you-for-help-tp3993397p3993808.html Sent from the Lucen

Re: about some seacher(I'm new hand, thank you for help)

2012-07-06 Thread Ian Lea
Split the data into 2 fields, timestamp and content. Store one lucene document per line with the 2 fields, timestamp stored and not indexed (unless you want to search on it), content stored and analyzed. Use StandardAnalyzer unless you have special requirements. Then close the IndexWriter, open

about some seacher(I'm new hand, thank you for help)

2012-07-05 Thread sam
I want seach a txt ,which is store like <2012-07-06 11:11:43some message> at one line .How to seach that,I need get the time and content. -- View this message in context: http://lucene.472066.n3.nabble.com/about-some-seacher-I-m-new-hand-thank-you-for-help-tp3993397.html Sent from the Lucene