lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Praveen Peddi" <ppe...@contextmedia.com>
Subject Re: problem with SortField[] in search method (newbie)
Date Wed, 15 Sep 2004 18:13:08 GMT
Does it mean you indexed all "not null" fields?. I think you should change
your code so that you always index the fields you want to sort.

In any case, it looks like some of your documents have shortName not null
and not indexed. If you do not have any non-indexed shotnames in the index,
I don't think u would have got that error. But I may be wrong.

Praveen

----- Original Message ----- 
From: "Wermus Fernando" <fernando.wermus@xlnet.net.ar>
To: "Lucene Users List" <lucene-user@jakarta.apache.org>
Sent: Wednesday, September 15, 2004 1:53 PM
Subject: RE: problem with SortField[] in search method (newbie)


Aviran,
I can search in not indexed fields without any exception, but I can't order
by the same fields.
Besides,  I can't know in advance if they are indexed in my app, because I
index those fields that have some value, if it doesn't I don't add it to the
document.

What if I don't have any document indexed?



-----Mensaje original-----
De: Aviran [mailto:amordo@infosciences.com]
Enviado el: MiƩrcoles, 15 de Septiembre de 2004 02:35 p.m.
Para: 'Lucene Users List'
Asunto: RE: problem with SortField[] in search method (newbie)

You can only sort on indexed field. (even more than that, it'll work
properly only on Untokenized fields, ie keyword).

Aviran

-----Original Message-----
From: Wermus Fernando [mailto:fernando.wermus@xlnet.net.ar]
Sent: Wednesday, September 15, 2004 13:13 PM
To: lucene-user@jakarta.apache.org
Subject: problem with SortField[] in search method (newbie)


Luceners,
My search looks up the whole entities. My entities are accounts, contacts,
tasks, etc. My searching looks up a group of entity's fields. This works
fine despite, I don't have indexed any entity in a document. But If I sort
by some fields from different entities, I get the following error.

field "shortName" does not appear to be indexed

The account's field I have indexed are

shortName,number,location,fax,phone,symbol

and I order by

shortName
----------------------------------------------------
without  any order

shortName,number,location,fax,phone,symbol

it works fine.
----
I don't understand the behavior because If I don't order the searching and I
don't have any document indexed, It works fine, but If I add an order I get
a runtimeException and I can't catch the exception  to solve the problem.
The only solution it's to index the whole fields' entitities once in a
document, but for me it's a patch.

Any idea,  it could help me out.

Thanks in advance.



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


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


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


Mime
View raw message