Search in multi fields with cross field AND ?

2005-08-04 Thread erlend.bjorge
Hi there! I'm fairly new to Lucene and trying evaluate it. I want to retrieve only documenets (companies) that has all the words searched for in different fields, crossed in different fields with AND search. I have a structure in the "documents" (companies) like this : companyName string keyw

SV: Search in multi fields with cross field AND ?

2005-08-04 Thread erlend.bjorge
Hi there Martin! >try this code: >QueryParser q = new QueryParser("text", analyzer); What is "text" in this context ? All fields for the Field.text ? Or like I understand it, name of a field, like my "keywords1" ?? Anyway, this code didn't work at all with "text" at least, 0 hits, Even with one

SV: setBoost(float) in org.apache.lucene.document.Field cannot be applied to (double)???

2005-08-04 Thread erlend.bjorge
Hi! >Field senderNameField = Field.Text("senderName", senderName); Field >subjectField = Field.Text("subject", subject); subjectField.setBoost(1.2); Try: subjectField.setBoost(1.2f); ? :-) Erlend - To unsubscribe, e-mail: [E

SV: SV: Search in multi fields with cross field AND ?

2005-08-05 Thread erlend.bjorge
Hi Martin! It's starts to work know, thanks !! :-) >In my case "text" is everything. Whenever I add anything to the index, I >also add a "text" Field. So in your case, I would build the index like >you did with an additional >doc.add(Field.Text("text", bean.getCompanyName())); I see, but I do