You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Antonello Provenzano <an...@deveel.com> on 2008/02/20 23:17:30 UTC

Search terms in the result

Hi guys,

I'm not a total newbie (but almost) to Solr, but I would like a
clarification about the XML format returned by a search query: in
fact, I cannot find any official document describing the precise
format of the document returned.

Particularly, I'm interested in understanding if search terms of the
query would be returned in the result, as happens in Lucene.

Thanks for your help: I guess it will happen many times more I will
ask for it... :)
Antonello

Re: Search terms in the result

Posted by Chris Hostetter <ho...@fucit.org>.
: 
: Thank you for answering my question, but maybe I wasn't clear in
: explaining it. In fact, what I meant was that using the Query
: compilation in Lucene you can obtain an array of strings containing
: the terms used from the system to search the indices.

are you refering to Query.extractTerms() ?

there isn't anything like that built in right now ... i would imagine it 
would be pretty easy to add it as a component however.

if you are using the standard request handler you could use 
debugQuery=true and then show them what the "parsedquery" looks like ... 
it will have the same basic information in string form.



-Hoss


Re: Search terms in the result

Posted by Antonello Provenzano <an...@deveel.com>.
Chris,

Thank you for answering my question, but maybe I wasn't clear in
explaining it. In fact, what I meant was that using the Query
compilation in Lucene you can obtain an array of strings containing
the terms used from the system to search the indices.
The reason I'm asking this because, depending on the Analyzer
implementation (eg. StopWordsAnalyzer) or from the form of the query
(eg. "the terms" to search) some words in it could be ignored.
I would like to provide users with the list of the terms we run the
search on and I was wondering if is it there a way to get these terms
back from the system.

Thank you again.
Antonello


On Mon, Feb 25, 2008 at 8:23 AM, Chris Hostetter
<ho...@fucit.org> wrote:
> : clarification about the XML format returned by a search query: in
>
> : fact, I cannot find any official document describing the precise
>  : format of the document returned.
>
>  that's because no one has every really taken much time to document it ..
>  in general the XML format is considered fairly "self describing" ... the
>  interesting variations come about depending on what request handler you
>  use (the XML format is extremely generic, request handlers can put almost
>  any data into it as long as the data can be described in terms of simple
>  datastructures)
>
>
>  : Particularly, I'm interested in understanding if search terms of the
>
> : query would be returned in the result, as happens in Lucene.
>
>  i'm not sure what you mean by "as happens in Lucene" but there is a
>  core request params that cna be used to force the response writer to
>  include input params in the response: "echoParams" ... you can also use
>  "debugQuery" to get debugging oriented information in the response (that
>  includes info on the query executed.
>
>  http://wiki.apache.org/solr/CoreQueryParameters
>  http://wiki.apache.org/solr/CommonQueryParameters
>
>
>
>
>  -Hoss
>
>

Re: Search terms in the result

Posted by Chris Hostetter <ho...@fucit.org>.
: clarification about the XML format returned by a search query: in
: fact, I cannot find any official document describing the precise
: format of the document returned.

that's because no one has every really taken much time to document it .. 
in general the XML format is considered fairly "self describing" ... the 
interesting variations come about depending on what request handler you 
use (the XML format is extremely generic, request handlers can put almost 
any data into it as long as the data can be described in terms of simple 
datastructures)


: Particularly, I'm interested in understanding if search terms of the
: query would be returned in the result, as happens in Lucene.

i'm not sure what you mean by "as happens in Lucene" but there is a
core request params that cna be used to force the response writer to 
include input params in the response: "echoParams" ... you can also use 
"debugQuery" to get debugging oriented information in the response (that 
includes info on the query executed.

http://wiki.apache.org/solr/CoreQueryParameters
http://wiki.apache.org/solr/CommonQueryParameters




-Hoss