tool to check the index field

2004-11-17 Thread lingaraju
HI ALL

I am having  index file created by other people
Now  i want to know how many field are there in the index
Is there any third party tool to do this
I saw some where some GUI tool to do this but  forgot the name.

Regards
LingaRaju 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



highlight the search word

2004-08-14 Thread lingaraju
Dear  All

How to highlight the search word

Thanks and regards
raju

search for and condition

2004-08-09 Thread lingaraju
Dear  all

String line=text1 text2;
Query q = MultiFieldQueryParser.parse(line,fields,analyzer);
Hits hits = searcher.search(q);

Here search will take text1 OR text2 Condition
How  to make searh  text1 and  text2 Condiation

Thanks and regards
Lingaraju.T.S


Having common word in the search

2004-08-02 Thread lingaraju
Dear  All

Searcher searcher = new IndexSearcher(C:/index);
Analyzer analyzer = new StandardAnalyzer();
String line=curry asia;  
line=line+recipe;
String fields[] = new String[2];
fields[0] = title;
fields[1] = contents;

Query q = MultiFieldQueryParser.parse(line,fields,analyzer);
Hits hits1 = searcher.search(q);

In the above code Hits will return the documnet  that contains
the word 
1)Curry OR asia OR recipe
2)Curry OR asia AND recipe
3)Curry AND asia AND recipe
4)Curry AND asia OR recipe

But I want the result should be
Like this 
1)Curry AND asia AND recipe
2)(Curry OR asia) AND recipe

My question is how to give the condition
Actually my requirement is like this 
User will enter some text in text box it may be one word or two word or n word.(Eg 
curry asia)
but when i am searching i will append recipe word in the search string so the search 
must contains recipe  word.

Finally search should contains
1)Curry AND asia AND recipe
2)(Curry OR asia) AND recipe

search should not contains
1)Curry AND asia OR recipe
2)Curry OR asia OR recipe


Thanks and regards
Raju

Re: Logic of score method in hits class

2004-07-27 Thread lingaraju
I did in the same way what you mentioned i mean divide all scores by the
first score and multiply by 100

Still I am not geeting exactly what I wanted.
I am searching for two words asia cup in the search
First three hits contains both words what i am searching for  but i got
percentages 100,69 and 33 respectively.

I am using

 String fields[] = new String[2];
 fields[0] = title;
 fields[1] = contents;
 Query q = MultiFieldQueryParser.parse(line,fields,analyzer);

 Hits hits = searcher.search(q);
 float sc = hits.score(i);

Thanks in advance
Raju






- Original Message - 
From: Doug Cutting [EMAIL PROTECTED]
To: Lucene Users List [EMAIL PROTECTED]
Sent: Monday, July 26, 2004 11:37 PM
Subject: Re: Logic of score method in hits class


 Lucene scores are not percentages.  They really only make sense compared
 to other scores for the same query.  If you like percentages, you can
 divide all scores by the first score and multiply by 100.

 Doug

 lingaraju wrote:
  Dear  All
 
  How the score method works(logic) in Hits class
  For 100% match also score is returning only 69%
 
  Thanks and regards
  Raju
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Time of last insert

2004-07-27 Thread lingaraju

Dear  All

How to know that, when(lastmodified time) last document is added to in index

Thanks and regards
Raju


Re: updating the index created for database search

2004-07-27 Thread lingaraju
I tried but I am missing some thing
Please can you tell me the syntax how to use the TermQuery to check the
presence of document in index from key field say OID

- Original Message - 
From: Daniel Naber [EMAIL PROTECTED]
To: Lucene Users List [EMAIL PROTECTED]
Sent: Monday, July 26, 2004 5:21 PM
Subject: Re: updating the index created for database search


 On Monday 26 July 2004 13:31, lingaraju wrote:

  If it is new record  through which class we have to check that record is
  present in the index

 Just search for the id with a TermQuery. If you get a hit, the record is
in
 the index already.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Time of last insert

2004-07-27 Thread lingaraju
But  that method is deprecated and Replaced by getCurrentVersion()

- Original Message - 
From: Erik Hatcher [EMAIL PROTECTED]
To: Lucene Users List [EMAIL PROTECTED]
Sent: Tuesday, July 27, 2004 6:25 PM
Subject: Re: Time of last insert


 
 On Jul 27, 2004, at 5:15 AM, Otis Gospodnetic wrote:
  There is no API for that.
 
 Yeah there is!  :)
 
 IndexReader.lastModified()
 
 I borrowed that from LIMO's .jsp page, by the way.
 
 Erik
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



updating the index created for database search

2004-07-26 Thread lingaraju
Dear  All

I need  help  to  update the index created for the database search

I created the index with  three field  mapping to the three column of 
database(oid(primarykey),title, contents)
Then I created the document for each row and added to the writer  

doc.add(Field.Keyword(OID,oid+));
doc.add(Field.Text(title,title));
doc.add(Field.Text(contents,contents));
writer.addDocument(doc);

Here search is only on  title and the contents and oid is the key to retrieve the 
details from the database.

Later if the contents column in the database is  updated. We have to updated the 
content in the index also

If I use the writer with false

IndexWriter writer = new IndexWriter(C\index, new StandardAnalyzer(),false);

then all the record are inserted in to index without deleting the old index causing 
duplication 


If I use the writer with true

IndexWriter writer = new IndexWriter(C\index, new StandardAnalyzer(),false);

then record are inserted in to index deleting all the old index.

My question is 
1) How to update the existing index 
2) When I fetch the rows from the database in order to update or insert in index how 
to know which record is modified in database and which record is not present is index

Thanks is advance
Raju


Logic of score method in hits class

2004-07-26 Thread lingaraju
Dear  All

How the score method works(logic) in Hits class
For 100% match also score is returning only 69% 

Thanks and regards
Raju


Re: updating the index created for database search

2004-07-26 Thread lingaraju
Dear Daniel

Thanks a lot.
I do have the last-modified column in my database.
But how to know how many records are modified.
If it is new record  through which class we have to check that record is
present in the index
In the mean time I will look into IndexHTML in lucene demo

Regards
Raju

- Original Message - 
From: Daniel Naber [EMAIL PROTECTED]
To: Lucene Users List [EMAIL PROTECTED]
Sent: Monday, July 26, 2004 3:35 PM
Subject: Re: updating the index created for database search


 On Monday 26 July 2004 11:37, lingaraju wrote:

  2) When I fetch the rows from the database in order to update or insert
in
  index how to know which record is modified in database and which record
is
  not present is index

 Your database will need a last modified column. Then you can select
those
 rows that have been modified since the last update and for each row check
if
 it's in the Lucene index. If it is, delete it there and re-add the new
 version. If it's not, add it. To delete documents you will probably need
to
 iterate over all your IDs in the Lucene index and check if they are still
in
 the database. If that's too inefficient you could check if you can do it
the
 way the file system indexer (IndexHTML in Lucene's demo) does it.

 BTW, please don't cross-post to both lists.

 Regards
  Daniel

 -- 
 Daniel Naber, IntraFind Software AG, Tel. 089-8906 9700


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: updating the index created for database search

2004-07-26 Thread lingaraju
Dear Daniel

Thakns
Secod part is ok  What about the first part I mean how to know how many
records are modified

Regards
Raju

- Original Message - 
From: Daniel Naber [EMAIL PROTECTED]
To: Lucene Users List [EMAIL PROTECTED]
Sent: Monday, July 26, 2004 5:21 PM
Subject: Re: updating the index created for database search


 On Monday 26 July 2004 13:31, lingaraju wrote:

  If it is new record  through which class we have to check that record is
  present in the index

 Just search for the id with a TermQuery. If you get a hit, the record is
in
 the index already.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Searching against Database

2004-07-15 Thread lingaraju
Hello

Even i am searching the same code as all my web display information is
stored  in database.
Early response will be very much helpful

Thanks and regards
Raju

- Original Message - 
From: Hetan Shah [EMAIL PROTECTED]
To: Lucene Users List [EMAIL PROTECTED]
Sent: Thursday, July 15, 2004 5:56 AM
Subject: Searching against Database


 Hello All,

 I have got all the answers from this fantastic mailing list. I have
 another question ;)

 What is the best way (Best Practices) to integrate Lucene with live
 database, Oracle to be more specific. Any pointers are really very much
 appreciated.

 thanks guys.
 -H


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]