Retrieving parsed query string terms

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Retrieving parsed query string terms

Cesar Ronchese
Hey, its me again :P

I've been looking a way to retrieve all parsed terms from a given query string, but no success till now. For example, I need convert:

    word01 "word02 word03" AND word04 theField:(xyz) mod_date:[20020101 TO 20030101] (abc OR xyp)

into:

    word01
    "word02 word03"
    word04
    theField:(xyz)
    mod_date:[20020101 TO 20030101]
    (abc OR xyp)


Is there a way to retrive those results in a string array or term objects?

Thanks in advance.
Cesar
Reply | Threaded
Open this post in threaded view
|

Re: Retrieving parsed query string terms

balaji.gandhi
Hi,

I am trying to do something similar:-

Eg.
Input: (name:John AND name:Doe)
Output: ((firstName:John OR lastName:John) AND (firstName:John OR lastName:John))

How can I extract the fields, change them and repackage the query?

Thanks,
Balaji