You don't want just a list of all the indexed words in the database .
You don't want just a list of all the indexed words in a document.
You want a list of all the indexed words in a user-specified part of the database,
for instance all the words appearing in tag <country> at any level in any
With my proposal, one could get this so :
String countries = eXistEngine.getWordsList( "document(*)//country" );
Probably returning a Collection would be better ...
Is this clear now ?
> From: "Wolfgang Meier" <sbhati@...>
> To: <exist-open@...>
> Subject: RE: [Exist-open] API to access indexed words
> Date: Sun, 31 Mar 2002 00:02:44 +0100
> I've been travelling the last two weeks, so please excuse me for not
> responding to this list for some time.
> It would not be difficult to implement a function to access index terms. But
> how exactly should the proposed
> function behave? I'm not sure I completely understand what it is supposed to
> [mailto:exist-open-admin@...]Im Auftrag von Jean-Marc
> Gesendet: Freitag, 29. Marz 2002 22:18
> An: exist-open@...
> Betreff: [Exist-open] API to access indexed words
> It would be nice to access indexed words from an application.
> They are allready stored in the internal database. Moreover, indexing
> words is the main function that eXist has above simple ;-) XML stores.
> This would allow an application to propose better queries.
> Ideally, the API would be someting like:
> String getWordsList( String XPathRequest );
> Of course, this could be done externally :
> - make the query
> - stringify the resulting XML (as by normalize-space() in XPath )
> - tokenize to get words
> - put each word in a Set
> You see that it is a lot of CPU and memory for an information that is
> allready in the eXist database ...