Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
AW: [smila-user] Searching on annotations

Hi Giorgio,

the Lucene integration was not designed to allow for searching in annotations. We decided to allow only attributes and attachments, and only those on top level of the Record. The problem is that you have to somehow map the elements of a record (flat or hierarchical) to Lucene index fields (flat only). You could change the implementation of LuceneIndexService to also support Annotations in some way.

If you use the RecordStorage then all records are persisted with all their values (attributes and annotations, attachments are stored in the BinaryStorage of course). However, there is no functionality to select Records from the Storage via Query (selecting specific attribute or anno9tation values).  You can only access them via the Record Id or get all records for a DataSource.

So if you want to be able to search for annotations the easiest way will be to change the LuceneIndexService implementation or to think about using attributes for your data instead of annotations.

Bye,
Daniel


-----Ursprüngliche Nachricht-----
Von: smila-user-bounces@xxxxxxxxxxx [mailto:smila-user-bounces@xxxxxxxxxxx] Im Auftrag von Giorgio Sironi
Gesendet: Donnerstag, 20. Mai 2010 09:54
An: Smila project user mailing list
Betreff: [smila-user] Searching on annotations

As I have now reached the point of producing annotations on attributes
(specifically annotations on the unique literal of an attribute), I am
now trying to do a search on them with LuceneSearchService.
The search on an attribute is fine: I set the "query" parameter and
the LuceneSearchService.SEARCH_ANNOTATION_QUERY_ATTRIBUTE to the name
of the attribute I want to search on. Maybe there is a clever way to
do an OR search on all the various attributes?
I have no clue however on how to search on annotations, since in the
Mappings.xml file I can specify only <Attribute> and <Attachment> tags
(the schema said so). So are the annotation saved in the storage? And
how can I specify to query them?
Thanks for any help.

-- 
Giorgio Sironi
Piccolo Principe & Web Engineer
http://giorgiosironi.blogspot.com
http://twitter.com/giorgiosironi
_______________________________________________
smila-user mailing list
smila-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/smila-user


Back to the top