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 Israel Ekpo <is...@gmail.com> on 2010/10/01 13:43:10 UTC

Re: [PECL-DEV] Re: PHP Solr API

Scott,

You can also use the SolrClient::setServlet() method with
SolrClient::TERMS_SERVLET_TYPE as the type

http://www.php.net/manual/en/solrclient.setservlet.php



On Fri, Oct 1, 2010 at 12:57 AM, Scott Yeadon <sc...@anu.edu.au>wrote:

>  Hi,
>
> Sorry, scrap that, just found that SolrQuery is a subclass of
> ModifiableParams so can do this via "add" method and seems to work ok.
>
> Apologies for the noise.
>
> Scott.
>
>
> On 1/10/10 2:35 PM, Scott Yeadon wrote:
>
>>  Hi,
>>
>> Just wondering if there is a way of setting the "qt" parameter in the Solr
>> PHP API. I want to use the Term Vector Component but not sure this is
>> supported in the API?
>>
>> Thanks
>>
>> Scott.
>>
>
>
> --
> PECL development discussion Mailing List (http://pecl.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
°O°
"Good Enough" is not good enough.
To give anything less than your best is to sacrifice the gift.
Quality First. Measure Twice. Cut Once.
http://www.israelekpo.com/

Re: [PECL-DEV] Re: PHP Solr API

Posted by Stefan Matheis <ma...@googlemail.com>.
oooh, sorry - used the wrong thread for my suggestion ... please, just
ignore this :)

On Wed, Dec 1, 2010 at 2:01 PM, Stefan Matheis <
matheis.stefan@googlemail.com> wrote:

> Hi again,
>
> actually trying to implement spellcheck on a different way, and had the
> idea to access /solr/spellcheck to get all required data, before executing
> the final query to /solr/select - but, that seemed to be impossible - since
> there is no configuration option to change the /select part of the url? the
> part before can be configure through 'path', but nothing else.
>
> maybe that will be an idea to allow this part of the url to be configured,
> in what-ever way?
>
> Regards
> Stefan
>

Re: [PECL-DEV] Re: PHP Solr API

Posted by Stefan Matheis <ma...@googlemail.com>.
Hi again,

actually trying to implement spellcheck on a different way, and had the idea
to access /solr/spellcheck to get all required data, before executing the
final query to /solr/select - but, that seemed to be impossible - since
there is no configuration option to change the /select part of the url? the
part before can be configure through 'path', but nothing else.

maybe that will be an idea to allow this part of the url to be configured,
in what-ever way?

Regards
Stefan

Re: [PECL-DEV] Re: PHP Solr API

Posted by Scott Yeadon <sc...@anu.edu.au>.
  Thanks. Not sure what the "value" should be (assume it is the servlet 
name, but is there a default servlet name for term vectors? - the docs 
don't really say much, so any guidance useful).  It also looks like 
using the ModifiableParams returns only a single offset for each term 
i.e. if tf > 1 there still only looks to be a single offset is returned 
rather than details of all three occurrences. I logged some output to 
see all the properties returned and the snippet showing offsets is:

[01-Oct-2010 15:42:30] class is SolrObject name is sit
[01-Oct-2010 15:42:30]   value=6   propname=tf
[01-Oct-2010 15:42:30] class is SolrObject name is offsets
[01-Oct-2010 15:42:30]   value=1171   propname=start
[01-Oct-2010 15:42:30]   value=1174   propname=end

So in the above example tf=6 but only a single start and end property is 
returned in the "sit" SolrObject. Note that I haven't looked any further 
into this at this stage and I may be missing something obvious.

Scott.

On 1/10/10 9:43 PM, Israel Ekpo wrote:
> Scott,
>
> You can also use the SolrClient::setServlet() method with 
> SolrClient::TERMS_SERVLET_TYPE as the type
>
> http://www.php.net/manual/en/solrclient.setservlet.php
>
>
>
> On Fri, Oct 1, 2010 at 12:57 AM, Scott Yeadon <scott.yeadon@anu.edu.au 
> <ma...@anu.edu.au>> wrote:
>
>      Hi,
>
>     Sorry, scrap that, just found that SolrQuery is a subclass of
>     ModifiableParams so can do this via "add" method and seems to work ok.
>
>     Apologies for the noise.
>
>     Scott.
>
>
>     On 1/10/10 2:35 PM, Scott Yeadon wrote:
>
>          Hi,
>
>         Just wondering if there is a way of setting the "qt" parameter
>         in the Solr PHP API. I want to use the Term Vector Component
>         but not sure this is supported in the API?
>
>         Thanks
>
>         Scott.
>
>
>
>     -- 
>     PECL development discussion Mailing List (http://pecl.php.net/)
>     To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>
> -- 
> °O°
> "Good Enough" is not good enough.
> To give anything less than your best is to sacrifice the gift.
> Quality First. Measure Twice. Cut Once.
> http://www.israelekpo.com/