Monday, January 23. 2012Using PLV8 to index JSONTrackbacks
Trackback specific URI for this entry
No Trackbacks
Comments
Display comments as
(Linear | Threaded)
I have been using the json module that came from the summer of code project. I used something like<br /> Yeah. The proposed core type doesn't sport this function, nor indeed anything which can manipulate JSON content. It's intentionally very minimal. Hence my use of PLV8 to pull data out. for (var i = 0; i < keys.length; i++) {<br /> Oh, sure. In PLV8 we can do anything. As I noted the function I wrote quickly could do much better. It was just by way of illustration. Another important point will be avoiding reparsing. That is: if I write<br /> For good or ill, the implementation of the type as proposed stores the JSON as a piece of text. Given that, I'm not sure how you can avoid reparsing for the evaluation of such an expression. On the other hand, if you have indexes on these two fields as shown in my example, no parsing at all will be required to find the matching rows, as the precomputed field values will be stored in the indexes. I found that using:<br /> The revised function below might do what you want better:<br /> Your revised one works great, except NULL needs to be in lowercase: "return null;" or else you'll get "ERROR: ReferenceError: NULL is not defined"<br /> |
My Links etcBlog AdministrationCalendar
QuicksearchArchivesCategories |
|||||||||||||||||||||||||||||||||||||||||||||||||