SwellRT / swellrt

SwellRT main project. Server, JavaScript and Java clients
http://swellrt.org/
Apache License 2.0
234 stars 34 forks source link

Include text objects information in SwellRT query #66

Closed atfornes closed 9 years ago

atfornes commented 9 years ago

SwellRT.query method does not show the text of the Text Objects, but an object similar to Object { xml="PGJvZHk+PGxpbmUvPmFzZGFz...rfCtyExMjMxMiA8L2JvZHk+", annotations=""}

It would be great if this object would also include the text of the collaborative text object

pablojan commented 9 years ago

Would you mind to describe the use case? In general, retrieving text objects is a costly operation, so I've to design the feature properly. Thanks

atfornes commented 9 years ago

It is useful for filtering the query by text: http://docs.mongodb.org/manual/reference/operator/query/text/ and for being able to work with the resulting text without having to open the waves.

Is the first already supported by the indexing feature?

To avoid unneeded costly operations, you can only enable this feature when requested by either a query containing text search on TextObjects or by a parameter specifying if getting text.

It is not currently needed by pear2pear app, but to obtain such a weird object containing the xml and annotations fields is unexpected.

pablojan commented 9 years ago

Of course, messy data mustn't be returned and it will be removed from query results.

Text queries is a new feature to plan and I think it requires a MongoDB upgrade. Please feel free to add a new issue if it's a desire feature in the short term