Re: Solr client in JavaScript

2020-10-01 Thread Shawn Heisey

On 10/1/2020 3:55 AM, Sunil Dash wrote:

This is my javascript code ,from where I am calling solr ,which has a
loaded nutch core (index).
My java script client ( runs on TOMCAT server) and Solr
server are on the same machine (10.21.6.100) . May be due to cross
domain references issues OR something is missing I don't know.
I expected Response from Solr server (search result) as raw JASON
object. Kindly help me fix it.Thanks in advance .


As far as I can tell, your message doesn't tell us what the problem is. 
So I'm having a hard time coming up with a useful response.


If the problem is that the response isn't JSON, then either you need to 
tell Solr that you want JSON, or run a new enough version that the 
default response format *IS* JSON.  I do not recall which version we 
changed the default from XML to JSON.


One thing you should be aware of ... if the javascript is running in the 
end user's browser, then the end user has direct access to your Solr 
install.  That is a bad idea.


Thanks,
Shawn


Solr client in JavaScript

2020-10-01 Thread Sunil Dash
This is my javascript code ,from where I am calling solr ,which has a
loaded nutch core (index).
My java script client ( runs on TOMCAT server) and Solr
server are on the same machine (10.21.6.100) . May be due to cross
domain references issues OR something is missing I don't know.
I expected Response from Solr server (search result) as raw JASON
object. Kindly help me fix it.Thanks in advance .

Rgds
Sunil Kumar



  Solr Search  


function search()
{
 var xmlHttpReq =false;
 var  xmlHttpClient=this;

 var hostURL='http://10.21.6.100:8983/solr/nutch/select';
 var querystring=document.getElementById("querystring").value;
 qstr='q='+escape(querystring)+"&fl=content";

 if(window.XMLHttpRequest){  xmlHttpClient.xmlHttpReq=new
XMLHttpRequest(); }

 xmlHttpClient.xmlHttpReq.open('POST',hostURL,true);


xmlHttpClient.xmlHttpReq.setRequestHeader('Content-Type','application/x-www-form-urlencoded');

 xmlHttpClient.xmlHttpReq.send(qstr);

 xmlHttpClient.xmlHttpReq.onreadystatechange=function()
  {
  if(xmlHttpClient.xmlHttpReq.readyState ==4 )
{ showresponse(xmlHttpClient.xmlHttpReq.responseText);}
  }

}

 function showResponse(str)
{
   document.getElementById("responsestring").innerHTML=str;
}



 Solr Search [ From Javascript ]

 
 
 


 



Re: Solr client

2020-09-07 Thread Konstantinos Koukouvis
Had no idea about this! Thanks a lot Eric!!

> On 4 Sep 2020, at 12:14, Eric Pugh  wrote:
> 
> Konstantinos, have you seen https://solr.cool/?  It’s an aggregation site for 
> all the extensions to Solr.   You can add your project there, and that should 
> get some more awareness!
> 
> 
>> On Sep 2, 2020, at 2:21 AM, Konstantinos Koukouvis 
>>  wrote:
>> 
>> Hi everybody, sorry in advance if I’m using the mailing list wrong, this is 
>> the first time I’m attempting such a thing.
>> 
>> To all you gophers out there we at Mecenat, have been working at a new solr 
>> client wrapper with focus on single solr instance usage, that supports the 
>> search API, schema API and core admin API. With this email I’m trying to 
>> raise awareness to the community, get some feedback by having more people to 
>> test every nook and cranny of it, so that we can improve our solution and 
>> hopefully help you find that client that makes using solr in go more 
>> intuitive and simple.
>> 
>> Here’s the link, and thank you all for your time:
>> https://github.com/mecenat/solr
>> 
>> With regards,
>> Konstantinos
>> 
> 
> ___
> Eric Pugh | Founder & CEO | OpenSource Connections, LLC | 434.466.1467 | 
> http://www.opensourceconnections.com <http://www.opensourceconnections.com/> 
> | My Free/Busy <http://tinyurl.com/eric-cal>  
> Co-Author: Apache Solr Enterprise Search Server, 3rd Ed 
> <https://www.packtpub.com/big-data-and-business-intelligence/apache-solr-enterprise-search-server-third-edition-raw>
>   
> This e-mail and all contents, including attachments, is considered to be 
> Company Confidential unless explicitly stated otherwise, regardless of 
> whether attachments are marked as such.
> 



Re: Solr client

2020-09-04 Thread Eric Pugh
Konstantinos, have you seen https://solr.cool/?  It’s an aggregation site for 
all the extensions to Solr.   You can add your project there, and that should 
get some more awareness!


> On Sep 2, 2020, at 2:21 AM, Konstantinos Koukouvis 
>  wrote:
> 
> Hi everybody, sorry in advance if I’m using the mailing list wrong, this is 
> the first time I’m attempting such a thing.
> 
> To all you gophers out there we at Mecenat, have been working at a new solr 
> client wrapper with focus on single solr instance usage, that supports the 
> search API, schema API and core admin API. With this email I’m trying to 
> raise awareness to the community, get some feedback by having more people to 
> test every nook and cranny of it, so that we can improve our solution and 
> hopefully help you find that client that makes using solr in go more 
> intuitive and simple.
> 
> Here’s the link, and thank you all for your time:
> https://github.com/mecenat/solr
> 
> With regards,
> Konstantinos
> 

___
Eric Pugh | Founder & CEO | OpenSource Connections, LLC | 434.466.1467 | 
http://www.opensourceconnections.com <http://www.opensourceconnections.com/> | 
My Free/Busy <http://tinyurl.com/eric-cal>  
Co-Author: Apache Solr Enterprise Search Server, 3rd Ed 
<https://www.packtpub.com/big-data-and-business-intelligence/apache-solr-enterprise-search-server-third-edition-raw>

This e-mail and all contents, including attachments, is considered to be 
Company Confidential unless explicitly stated otherwise, regardless of whether 
attachments are marked as such.



Solr client

2020-09-02 Thread Konstantinos Koukouvis
Hi everybody, sorry in advance if I’m using the mailing list wrong, this is the 
first time I’m attempting such a thing.

To all you gophers out there we at Mecenat, have been working at a new solr 
client wrapper with focus on single solr instance usage, that supports the 
search API, schema API and core admin API. With this email I’m trying to raise 
awareness to the community, get some feedback by having more people to test 
every nook and cranny of it, so that we can improve our solution and hopefully 
help you find that client that makes using solr in go more intuitive and simple.

Here’s the link, and thank you all for your time:
https://github.com/mecenat/solr

With regards,
Konstantinos



solr client time out setting

2020-03-08 Thread Tracy La
Hello Solr Community,
I'm a first timer here.  What is the right way to set timeout connection
using SolrJ?

I'm using cloudSolrClient to index into Solr (v8.2) and running into a
timeout issue.  I tried using withConnectionTimeout from
CloudSolrClient.Builder and both cloudSolrClient.setZkClientTimeout
<https://lucene.apache.org/solr/8_2_0/solr-solrj/org/apache/solr/client/solrj/impl/BaseCloudSolrClient.html#setZkClientTimeout-int->
 and setZkConnectTimeout
<https://lucene.apache.org/solr/8_2_0/solr-solrj/org/apache/solr/client/solrj/impl/BaseCloudSolrClient.html#setZkConnectTimeout-int->,
none of these settings seem to work.  Any suggestions on where to set this
timeout setting?


org.apache.solr.client.solrj.SolrServerException: Timeout occurred while
waiting response from server at:
06 Mar 2020 14:40:24 - [Thread[Thread-50,5,main]] - at
org.apache.solr.client.solrj.impl.HttpSolrClient.executeMethod(HttpSolrClient.java:667)
06 Mar 2020 14:40:24 - [Thread[Thread-50,5,main]] - at
org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:262)
06 Mar 2020 14:40:24 - [Thread[Thread-50,5,main]] - at
org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:245)
06 Mar 2020 14:40:24 - [Thread[Thread-50,5,main]] - at
org.apache.solr.client.solrj.impl.LBSolrClient.doRequest(LBSolrClient.java:368)
06 Mar 2020 14:40:24 - [Thread[Thread-50,5,main]] - at
org.apache.solr.client.solrj.impl.LBSolrClient.request(LBSolrClient.java:296)
06 Mar 2020 14:40:24 - [Thread[Thread-50,5,main]] - at
org.apache.solr.client.solrj.impl.BaseCloudSolrClient.sendRequest(BaseCloudSolrClient.java:1128)
06 Mar 2020 14:40:24 - [Thread[Thread-50,5,main]] - at
org.apache.solr.client.solrj.impl.BaseCloudSolrClient.requestWithRetryOnStaleState(BaseCloudSolrClient.java:897)
06 Mar 2020 14:40:24 - [Thread[Thread-50,5,main]] - at
org.apache.solr.client.solrj.impl.BaseCloudSolrClient.request(BaseCloudSolrClient.java:829)
06 Mar 2020 14:40:24 - [Thread[Thread-50,5,main]] - at
org.apache.solr.client.solrj.SolrClient.request(SolrClient.java:1274)

and is there a way to search these mailing lists?

Thanks,
Tracy


Adding documents through Solr Client

2019-01-05 Thread lakshmi_ram20
Guys - I need help on exception handling while adding documents.

I am adding collection of documents - several millions with a batch of
2000-3000 documents through parallel threads -   through SolrJ.add (
Collection ) API  and storing the response in UpdateResponse object.
I was using response.getStatus to check for failure and capture the errors. 
 
#1) But the exception handling behavior is not what I expected it to be.
When one of the document has an error , System is directly throwing
exception. The code with response object.getStatus is never reached in case
of errors making "if getStatus <> 0 " unreachable.

#2) Also, if I am using collection of Solr documents and only few of the
documents has error , is it possible to get the document ids that has the
error than saying entire batch has some error.I want my users to have the
ability to correct those documents and re-submit..Right now , the only way
is to show entire 2000 documents have failed with an incorrect error message
that is only applicable to say 10-20 records.

Any guidance on exception handling while adding collection of documents is
appreciated. 



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Re: Need Help on Solr Client connection Pooling

2018-08-30 Thread Shawn Heisey

On 8/30/2018 2:13 AM, Gembali Satish kumar wrote:

*SolrClient client = new HttpSolrClient.Builder(*
* SolrUtil.getSolrURL(tsConfigUtil.getClusterAdvertisedAddress(),
aInCollectionName)).build();*

after my job search done, I am closing my client.
*client.close();*

but from UI getting more requests to search the data
I think to create the *client object *on every request is costly is there
any way to pool the *SolrClient objects?*?
If there kindly share me the reference


Yes, creating the client on every request is costly.

Supplementing what Shalin told you:

Exactly which version of SolrJ you're running can affect how many 
threads can use the object at the same time, unless you explicitly build 
it to handle more.  Newer versions set it up with lots of thread 
capability, but older versions just create the internal HttpClient 
object with defaults.  By default, HttpClient only allows two threads.


What version of SolrJ are you using?

Thanks,
Shawn



Re: Need Help on Solr Client connection Pooling

2018-08-30 Thread Shalin Shekhar Mangar
You should create a single HttpSolrClient and re-use for all requests. It
is thread safe and creates an Http connection pool internally (well Apache
HttpClient does).

On Thu, Aug 30, 2018 at 2:28 PM Gembali Satish kumar <
gembalisatishku...@gmail.com> wrote:

> Hi Team,
>
> Need some help on  Client connection object pooling
> I am using SolrJ API to connect the Solr.
>
> This below snippet I used to create the client object.
>
> *SolrClient client = new HttpSolrClient.Builder(*
> * SolrUtil.getSolrURL(tsConfigUtil.getClusterAdvertisedAddress(),
> aInCollectionName)).build();*
>
> after my job search done, I am closing my client.
> *client.close();*
>
> but from UI getting more requests to search the data
> I think to create the *client object *on every request is costly is there
> any way to pool the *SolrClient objects?*?
> If there kindly share me the reference
>
> Thanks and Regards,
> Satish
>


-- 
Regards,
Shalin Shekhar Mangar.


Need Help on Solr Client connection Pooling

2018-08-30 Thread Gembali Satish kumar
Hi Team,

Need some help on  Client connection object pooling
I am using SolrJ API to connect the Solr.

This below snippet I used to create the client object.

*SolrClient client = new HttpSolrClient.Builder(*
* SolrUtil.getSolrURL(tsConfigUtil.getClusterAdvertisedAddress(),
aInCollectionName)).build();*

after my job search done, I am closing my client.
*client.close();*

but from UI getting more requests to search the data
I think to create the *client object *on every request is costly is there
any way to pool the *SolrClient objects?*?
If there kindly share me the reference

Thanks and Regards,
Satish


Re: Solr client

2017-09-01 Thread ganesh m

Thank you all for the reply. I have updated the solr client list.

Regards

Ganesh



On 31-08-2017 00:37, Leonardo Perez Pulido wrote:

Hi,
Apart from take a look at the Solr's wiki, I think one of the main reasons
why these API's are all out dated is that Solr itself provides the 'API' to
many different languages in the form of output formats.

Maybe you know that the main protocol used in Solr for communication with
its clients is HTTP. Many (if not all) of today's programming languages
provides a mean to send request to Solr via HTTP. And Solr 'responses' to
every one of those languages via different available response formats.

By default there are response formats for: JavaScript, Python, Ruby, and
SolrJ (Java). All that response formats are first-class citizens in Solr.

Have a look:
http://wiki.apache.org/solr/IntegratingSolr
https://lucene.apache.org/solr/guide/6_6/client-apis.html

Regards.

On Wed, Aug 30, 2017 at 1:59 PM, Alexandre Rafalovitch <arafa...@gmail.com>
wrote:


We do have a page on the Wiki with a lot of that information.

Did you see it?

Regards,
 Alex


On 29 Aug. 2017 2:28 am, "Aditya" <findbestopensou...@gmail.com> wrote:

Hi

I am aggregating open source solr client libraries across all languages.
Below are the links. Very few projects are currently active. Most of them
are last updated few years back. Please provide me pointers, if i missed
any solr client library.

http://www.findbestopensource.com/tagged/solr-client
http://www.findbestopensource.com/tagged/solr-gui


Regards
Ganesh

PS: The website http://www.findbestopensource.com search is powered by
Solr.





Re: Solr client

2017-08-30 Thread Leonardo Perez Pulido
Hi,
Apart from take a look at the Solr's wiki, I think one of the main reasons
why these API's are all out dated is that Solr itself provides the 'API' to
many different languages in the form of output formats.

Maybe you know that the main protocol used in Solr for communication with
its clients is HTTP. Many (if not all) of today's programming languages
provides a mean to send request to Solr via HTTP. And Solr 'responses' to
every one of those languages via different available response formats.

By default there are response formats for: JavaScript, Python, Ruby, and
SolrJ (Java). All that response formats are first-class citizens in Solr.

Have a look:
http://wiki.apache.org/solr/IntegratingSolr
https://lucene.apache.org/solr/guide/6_6/client-apis.html

Regards.

On Wed, Aug 30, 2017 at 1:59 PM, Alexandre Rafalovitch <arafa...@gmail.com>
wrote:

> We do have a page on the Wiki with a lot of that information.
>
> Did you see it?
>
> Regards,
> Alex
>
>
> On 29 Aug. 2017 2:28 am, "Aditya" <findbestopensou...@gmail.com> wrote:
>
> Hi
>
> I am aggregating open source solr client libraries across all languages.
> Below are the links. Very few projects are currently active. Most of them
> are last updated few years back. Please provide me pointers, if i missed
> any solr client library.
>
> http://www.findbestopensource.com/tagged/solr-client
> http://www.findbestopensource.com/tagged/solr-gui
>
>
> Regards
> Ganesh
>
> PS: The website http://www.findbestopensource.com search is powered by
> Solr.
>


Re: Solr client

2017-08-30 Thread Alexandre Rafalovitch
We do have a page on the Wiki with a lot of that information.

Did you see it?

Regards,
Alex


On 29 Aug. 2017 2:28 am, "Aditya" <findbestopensou...@gmail.com> wrote:

Hi

I am aggregating open source solr client libraries across all languages.
Below are the links. Very few projects are currently active. Most of them
are last updated few years back. Please provide me pointers, if i missed
any solr client library.

http://www.findbestopensource.com/tagged/solr-client
http://www.findbestopensource.com/tagged/solr-gui


Regards
Ganesh

PS: The website http://www.findbestopensource.com search is powered by Solr.


Re: Solr client

2017-08-29 Thread Susheel Kumar
Looks good, Ganesh.  I do not see SolrJ explicitly mentioned in solr-client
page.

On Tue, Aug 29, 2017 at 2:28 AM, Aditya <findbestopensou...@gmail.com>
wrote:

> Hi
>
> I am aggregating open source solr client libraries across all languages.
> Below are the links. Very few projects are currently active. Most of them
> are last updated few years back. Please provide me pointers, if i missed
> any solr client library.
>
> http://www.findbestopensource.com/tagged/solr-client
> http://www.findbestopensource.com/tagged/solr-gui
>
>
> Regards
> Ganesh
>
> PS: The website http://www.findbestopensource.com search is powered by
> Solr.
>


Solr client

2017-08-29 Thread Aditya
Hi

I am aggregating open source solr client libraries across all languages.
Below are the links. Very few projects are currently active. Most of them
are last updated few years back. Please provide me pointers, if i missed
any solr client library.

http://www.findbestopensource.com/tagged/solr-client
http://www.findbestopensource.com/tagged/solr-gui


Regards
Ganesh

PS: The website http://www.findbestopensource.com search is powered by Solr.


php apache solr client - Solr HTTP Error 58: 'Problem with the local SSL certificate'

2017-04-21 Thread bay chae
Hi,

Apologies if this is an inappropriate place to contact please redirect if this 
is the case.

I have successfully setup solr(6.5.0) with ssl in my dev environment and can 
get a proper response using the following curl request:

curl -E ./etc/solr-ssl.keystore.p12:secret --cacert ./etc/solr-ssl.cacert.pem 
"https://localhost:8984/solr/mycollection/select?q=*:*=json=on 
”

...as advised in the official solr docs: 

https://cwiki.apache.org/confluence/display/solr/Enabling+SSL#EnablingSSL-ExampleClientActions
 


I have also installed into my php environment the official php client for 
apache solr (2.4.0) using pecl to install.

I have tested the client works in non-ssl mode when solr server does not force 
ssl on the client.

The problem I am having is:

[21-Apr-2017 17:00:36 UTC] Solr HTTP Error 58: 'Problem with the local SSL 
certificate' 
#0 Controller.php(37): SolrClient->ping()

With options:

$options = array
(
'hostname' => "localhost",
'port' => 8984,
'timeout'  => 10,
'secure'   => true,
'path' => 'solr/mycollection',
'ssl_cert' => SITE_ROOT . 'apps/config/solr-ssl.crt',   
'ssl_key'  => SITE_ROOT . 'apps/config/solr-ssl.keystore.pem', 
'ssl_keypassword' => 'secret',
 'ssl_cainfo' => SITE_ROOT . 'apps/config/solr-ssl.cacert.pem'   
);

These options while advised in the docs appear to be incompatible with example 
usage of curl as advised in the case of using curl with OS X Mavericks+.

I was hoping you might able to shed some light onto the problem I am having and 
how I might be able to remedy it.

As far as I am aware I have added all certs into OS X keychain with access to 
all applications.

Any help would be gratefully received.

Baychae

Re: Custom .... - Web toolkit for developing Solr Client application

2016-11-07 Thread Shawn Heisey
On 11/7/2016 3:31 AM, tesm...@gmail.com wrote:
> Thanks all for providing help to my previous question. I make my question
> generic to make it more clear.
>
> I have developed index with Lucene/Solr and can search the indexed data
> using Solr 'browse'. This interface provides some of the functionality for
> my client application
>
> I do understand that it is not advisable to use this interface for a web
> site due to security concerns.
>
> My question is :
> Are there any web tool kits available for developing Solr based web client
> applications. I need the following features:
> 1) User authentication
> 2) Search from one or more fields
> 3) Search term highlighting
> 4) Graphical view of the search results (month wise popularity index of 

There are Solr clients available for many different programming
languages.  Only one of those clients (SolrJ, a client for Java) is
produced by the project, all others are third-party projects.  SolrJ is
actually more than just a client -- it's part of Solr itself.

Here's a list of clients, probably not complete:

https://wiki.apache.org/solr/IntegratingSolr

These clients do not concern themselves with creating web pages, but
there are other libraries for the listed programming languages which ARE
designed to make creating web pages easier.  You can combine a Solr
client with one or more of those libraries, and write a complete
application.  You also have the option of just incorporating a client
for HTTP, and building all of the HTTP calls to Solr yourself.  That is
a huge amount of work, and not something that I recommend.

If you need assistance building your application and are willing to pay
for that assistance, you can find quite a lot of resources with a google
search for "solr consulting", and the Solr wiki has a list of companies
that provide support for Solr.  Some of these companies also do consulting:

https://wiki.apache.org/solr/Support?

There are many open source examples of code that interfaces to Solr and
creates a web page.  Solr support is available for lots of well-known
web products, like WordPress, Drupal, and so on.

Thanks,
Shawn



Re: Custom .... - Web toolkit for developing Solr Client application

2016-11-07 Thread tesm...@gmail.com
Hi,

Thanks all for providing help to my previous question. I make my question
generic to make it more clear.

I have developed index with Lucene/Solr and can search the indexed data
using Solr 'browse'. This interface provides some of the functionality for
my client application

I do understand that it is not advisable to use this interface for a web
site due to security concerns.

My question is :
Are there any web tool kits available for developing Solr based web client
applications. I need the following features:
1) User authentication
2) Search from one or more fields
3) Search term highlighting
4) Graphical view of the search results (month wise popularity index of a
hotel or alike)
5) Grouping similar search results.




Regards,


On Fri, Nov 4, 2016 at 8:53 PM, Erik Hatcher  wrote:

> What kind of graphical format?
>
> > On Nov 4, 2016, at 14:01, "tesm...@gmail.com"  wrote:
> >
> > Hi,
> >
> > My search query comprises of more than one fields like search string,
> date
> > field and a one optional field).
> >
> > I need to represent these on the web interface to the users.
> >
> > Secondly, I need to represent the search data in graphical format.
> >
> > Is there some Solr web client that provides the above features or Is
> there
> > a way to modify the default Solr Browse interface and add above options?
> >
> >
> >
> >
> >
> > Regards,
>


Fwd: index rich data with solarium php solr Client

2015-12-01 Thread kostali hassan
I get this Error
Invalid character encoding detected after position 79 of query string /
form data (while parsing as UTF-8)

this is my function to index rich data from directory contains many files
(msword and pdf) :

$config = array(
 "endpoint" => array("localhost" => array("host"=>"127.0.0.1",
 "port"=>"8983", "path"=>"/solr", "core"=>"demo",)
) );
$status='00';
$time='00';


if($_POST){
// create a client instance
$client = new Solarium\Client($config);
$dossier=$this->request->data['User']['dossier'];
$dir = new Folder($dossier);
$files = $dir->find('.*\.*');

foreach ($files as $file) {
$file = new File($dir->pwd() . DS . $file);

$query = $client->createExtract();

$query->setFile($file->pwd());
$query->setCommit(true);
$query->setOmitHeader(false);

$doc = $query->createDocument();
$doc->id =$file->pwd();
$doc->name = $file->name;
$doc->title = $file->name();

$query->setDocument($doc);

$result = $client->extract($query);
}

$status=$result->getStatus();
$time=$result->getQueryTime();
}

$this->set(compact('time','status'));
}


Re: PHP Solr Client - spellchecker

2014-03-12 Thread rachun
Thank you very much Shawn,

Now i'm trying to use prefix for my suggestion instead.


Best regards,
Chun




--
View this message in context: 
http://lucene.472066.n3.nabble.com/PHP-Solr-Client-spellchecker-tp4122780p4123054.html
Sent from the Solr - User mailing list archive at Nabble.com.


PHP Solr Client - spellchecker

2014-03-11 Thread rachun
Dear all gurus,


I'm having problem with trying to use spell checker for my suggestion and
I'm using PHP Solr client. So I tried to code like this
===PHP===

$config = array
(
'hostname'  = 'localhost',
'port'  = '8983',
'path'  = 'solr'
);

$q='macbook';
$client = new SolrClient($config);
$query = new SolrQuery();
$query-setQuery($q);
$query-addParam(shards.qt,/spell);
$query-addParam(fl,product_name_th);

$query_response = $client-query($query);
$result = $query_response-getResponse();

print_r($result);

 Result =

SolrObject Object
(
[responseHeader] = SolrObject Object
(
[status] = 0
[QTime] = 2
[params] = SolrObject Object
(
[fl] = product_name_th
[indent] = on
[shards.qt] = /spell
[start] = 0
[q] = macbook
[wt] = xml
[rows] = 0
[version] = 2.2
)

)

[response] = SolrObject Object
(
[numFound] = 4
[start] = 0
[docs] = 
)

)

=== Solr Log =

INFO  - 2014-03-11 15:23:48.556; org.apache.solr.core.SolrCore;
[collection1] webapp=/solr path=/select/
params={fl=product_name_thindent=onshards.qt=/spellstart=0q=macbookwt=xmlrows=0version=2.2}
hits=4 status=0 QTime=2 
==
At this log you can see it didn't go through my requestHandler named spell
but when I try this


http://localhost:8983/solr/spell?spellcheck=trueqt=spellcheckerspellcheck.accuracy=0.8spellcheck.collate=truefl=product_name_thextendedResults=true+q=macbook

I get the result like this (which is the way I would love it to be)

response
lst name=responseHeader
int name=status0/int
int name=QTime1/int
/lst
result name=response numFound=4 start=0

docstr name=product_name_thMacbook Pro/str/doc
docstr name=product_name_thMacbook air/str/doc
docstr name=product_name_thกระเป๋าใส่ macbook air/str/doc
docstr name=product_name_thกระเป๋าใส่ macbook pro/str/doc

/result
lst name=spellcheck
lst name=suggestionsbool
name=correctlySpelledfalse/bool/lst/lst
/response
==Solr log

INFO  - 2014-03-11 15:34:57.013; org.apache.solr.core.SolrCore;
[collection1] webapp=/solr path=/spell
params={spellcheck=trueextendedResults=truefl=product_name_thspellcheck.accuracy=0.8q=macbookspellcheck.collate=trueqt=spellchecker}
hits=4 status=0 QTime=2 

At this point I can see that it goes through my requestHandler named spell


Did I do something wrong?
I really need help.

Thank you very much,
Rachun

 





--
View this message in context: 
http://lucene.472066.n3.nabble.com/PHP-Solr-Client-spellchecker-tp4122780.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: PHP Solr Client - spellchecker

2014-03-11 Thread Shawn Heisey
On 3/11/2014 2:40 AM, rachun wrote:
 $q='macbook';
 $client = new SolrClient($config);
 $query = new SolrQuery();
 $query-setQuery($q);
 $query-addParam(shards.qt,/spell);
 $query-addParam(fl,product_name_th);
 
 $query_response = $client-query($query);
 $result = $query_response-getResponse();

snip

 === Solr Log =
 
 INFO  - 2014-03-11 15:23:48.556; org.apache.solr.core.SolrCore;
 [collection1] webapp=/solr path=/select/
 params={fl=product_name_thindent=onshards.qt=/spellstart=0q=macbookwt=xmlrows=0version=2.2}
 hits=4 status=0 QTime=2 
 ==
 At this log you can see it didn't go through my requestHandler named spell
 but when I try this

Your request went to the /select handler, not the /spell handler.  The
shards.qt parameter controls where the request goes for *distributed*
queries, not standard queries.

I do not see a method in the documentation for the PHP library that sets
the request handler path.  In SolrJ, this is the setRequestHandler method.

http://lucene.apache.org/solr/4_7_0/solr-solrj/org/apache/solr/client/solrj/SolrQuery.html#setRequestHandler%28java.lang.String%29

If you cannot set the request handler path to /spell instead of the
default /select then you would need to enable 'handleSelect' on the
requestDispatcher element in solrconfig.xml and send a qt parameter
set to /spell.  This capability was disabled in newer Solr releases
because it allows *any* request handler to be used with /select, even
/update, which is a potential exploit.

I would recommend asking for some help on whatever support resources are
available on the PHP client, and you may need to file a bug on that client.

Thanks,
Shawn



Thought exercise: features for Solr client

2013-11-14 Thread Alexandre Rafalovitch
Hello,

I am trying to imagine what would a new, fresh, Solr client library look
like. There has been a number of features added to Solr recently, so some
of the older libraries do not necessarily support them as well (e.g.
multi-collections, soft commits, multiple handler end-points, schema
auto-discovery, etc).
 If one were to write a new client, what would a useful version 1 would
look like for modern Solr? At the moment, I am not talking of a specific
implementation language. Stil, if you have any thoughts on that, they are
welcome too.

My own thought center around two directions that a library would need to
support:
1) Indexing on the backend
2) Middle-layers between the website and Solr doing some sort of query
security, enhancement, normalization, etc

Any thoughts?

Regards,
   Alex.
Personal website: http://www.outerthoughts.com/
LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch
- Time is the quality of nature that keeps events from happening all at
once. Lately, it doesn't seem to be working.  (Anonymous  - via GTD book)


Re: Thought exercise: features for Solr client

2013-11-14 Thread Alvaro Cabrerizo
Here goes my wishlist:

   - Transaction management
   - Access control at document level

Regards.


On Thu, Nov 14, 2013 at 10:35 AM, Alexandre Rafalovitch
arafa...@gmail.comwrote:

 Hello,

 I am trying to imagine what would a new, fresh, Solr client library look
 like. There has been a number of features added to Solr recently, so some
 of the older libraries do not necessarily support them as well (e.g.
 multi-collections, soft commits, multiple handler end-points, schema
 auto-discovery, etc).
  If one were to write a new client, what would a useful version 1 would
 look like for modern Solr? At the moment, I am not talking of a specific
 implementation language. Stil, if you have any thoughts on that, they are
 welcome too.

 My own thought center around two directions that a library would need to
 support:
 1) Indexing on the backend
 2) Middle-layers between the website and Solr doing some sort of query
 security, enhancement, normalization, etc

 Any thoughts?

 Regards,
Alex.
 Personal website: http://www.outerthoughts.com/
 LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch
 - Time is the quality of nature that keeps events from happening all at
 once. Lately, it doesn't seem to be working.  (Anonymous  - via GTD book)



Re: Thought exercise: features for Solr client

2013-11-14 Thread Michael Sokolov
I think there is a place for a client-side query hierarchy.  It would be 
nice if you could build a Lucene Query and the Solr client would 
serialize it for you.  If there were a general-purpose query 
serialization library then you could support a similar programming model 
for Lucene-only and with Solr. It would be useful for all kinds of 
things, since you wouldn't be tied to the query parser zoo.  The XML QP 
is a possible starting place for a serialization format, but I think 
ultimately to do this, Query would have to add support for some kind of 
generic representation (eg a map of children which could be primitives 
or queries).


-Mike

On 11/14/13 4:35 AM, Alexandre Rafalovitch wrote:

Hello,

I am trying to imagine what would a new, fresh, Solr client library look
like. There has been a number of features added to Solr recently, so some
of the older libraries do not necessarily support them as well (e.g.
multi-collections, soft commits, multiple handler end-points, schema
auto-discovery, etc).
  If one were to write a new client, what would a useful version 1 would
look like for modern Solr? At the moment, I am not talking of a specific
implementation language. Stil, if you have any thoughts on that, they are
welcome too.

My own thought center around two directions that a library would need to
support:
1) Indexing on the backend
2) Middle-layers between the website and Solr doing some sort of query
security, enhancement, normalization, etc

Any thoughts?

Regards,
Alex.
Personal website: http://www.outerthoughts.com/
LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch
- Time is the quality of nature that keeps events from happening all at
once. Lately, it doesn't seem to be working.  (Anonymous  - via GTD book)





Re: Solr client in CPP

2013-10-04 Thread Furkan KAMACI
There is an old question like that:

http://mail-archives.apache.org/mod_mbox/lucene-solr-user/201101.mbox/%3CAANLkTi=itRz7ni6HV-m=GTThzLb9G8XkWi92jBn=p...@mail.gmail.com%3E

Also you check that page for general information:

http://websolr.com/guides/solr-clients


2013/10/4 Neeraj Pandey neeraj.al...@gmail.com

 Hi all,
 My application is in cpp and I want to integrate solr with my application.
 Can any body tell me whether there is a solar client in cpp ?



Solr client in CPP

2013-10-03 Thread Neeraj Pandey
Hi all,
My application is in cpp and I want to integrate solr with my application.
Can any body tell me whether there is a solar client in cpp ?


Solr client 'Timeout was reached' ~ when new documents are inserted and commits are made.

2013-09-27 Thread Rafał Radecki
Hi All. 

I have a solr 3.5 multicore installation. It has ~250 of documents, ~1,5GB 
of index data. 
When the solr is feed with new documents I see for a few seconds timeouts 
'Timeout was reached' on clients. 
Is it normal behaviour of solr during inserting of new documents? 

Best regards, 
Rafał Radecki. 


Re: Solr client 'Timeout was reached' ~ when new documents are inserted and commits are made.

2013-09-27 Thread Erick Erickson
No, this isn't normal. You probably have your servlet container or your
clients have a too-short timeout. How long are we talking about here anyway?

Best,
Erick

On Fri, Sep 27, 2013 at 8:57 AM, Rafał Radecki
r.rade...@polskapresse.pl wrote:
 Hi All.

 I have a solr 3.5 multicore installation. It has ~250 of documents, 
 ~1,5GB of index data.
 When the solr is feed with new documents I see for a few seconds timeouts 
 'Timeout was reached' on clients.
 Is it normal behaviour of solr during inserting of new documents?

 Best regards,
 Rafał Radecki.


Re: Solr client 'Timeout was reached' ~ when new documents are inserted and commits are made.

2013-09-27 Thread Rafał Radecki
On client side timeout is set to 5s but when I look in solr log I see QTime 
less than 5000 (in ms). We use jetty to start solr process, where should I look 
for directives connected with timeouts? 




Re: Solr client 'Timeout was reached' ~ when new documents are inserted and commits are made.

2013-09-27 Thread Shawn Heisey
On 9/27/2013 7:41 AM, Rafał Radecki wrote:
 On client side timeout is set to 5s but when I look in solr log I see QTime 
 less than 5000 (in ms). We use jetty to start solr process, where should I 
 look for directives connected with timeouts? 

Five seconds is WAY too short a timeout for the entire http
conversation.  Generally a timeout is not required, but if you feel you
need to set one, set it in terms of minutes, with one minute as an
absolute minimum.

Updates generally take longer than queries.  The amount of time taken
for the update itself is usually fairly small, but after a commit there
is usually cache warming, which depending on your configuration can take
quite a while.

I'm pretty sure that you won't see the QTime of update requests in the
log, at least not listed as QTime like it is on queries.  Here are two
entries from my log, one for the doc insert, the other for the commit.
I believe the last number is the QTime, but it doesn't *say* QTime.

INFO  - 2013-09-27 08:27:00.806;
org.apache.solr.update.processor.LogUpdateProcessor; [inclive]
webapp=/solr path=/update params={wt=javabinversion=2}
{add=[notimexpix438424 (144734108581888), notimexpix438425
(1447341085825171456), notimexpix438426 (1447341085826220032),
notimexpix438427 (1447341085826220033), notimexpix438428
(1447341085827268608), notimexpix438429(1447341085828317184),
notimexpix438430 (1447341085829365760), notimexpix438431
(1447341085830414336), notimexpix438432 (1447341085831462912),
notimexpix438433 (1447341085831462913), ... (66 adds)]} 0 181

INFO  - 2013-09-27 08:27:01.975;
org.apache.solr.update.processor.LogUpdateProcessor; [inclive]
webapp=/solr path=/update
params={waitSearcher=truecommit=truewt=javabinversion=2softCommit=false}
{commit=} 0 1065

Note that the QTime doesn't represent the total amount of time for the
request, because it only measures the part that's in under the control
of the specific class that's generating the log - in this case
LogUpdateProcessor.  It can't measure the time the servlet container
takes to handle the HTTP conversation, or any part of the request that
takes place in Solr classes called before or after LogUpdateProcessor.

Thanks,
Shawn



Re: Solr client 'Timeout was reached' ~ when new documents are inserted and commits are made.

2013-09-27 Thread Shawn Heisey
On 9/27/2013 8:37 AM, Shawn Heisey wrote:
 INFO  - 2013-09-27 08:27:00.806;
 org.apache.solr.update.processor.LogUpdateProcessor; [inclive]
 webapp=/solr path=/update params={wt=javabinversion=2}
 {add=[notimexpix438424 (144734108581888), notimexpix438425
 (1447341085825171456), notimexpix438426 (1447341085826220032),
 notimexpix438427 (1447341085826220033), notimexpix438428
 (1447341085827268608), notimexpix438429(1447341085828317184),
 notimexpix438430 (1447341085829365760), notimexpix438431
 (1447341085830414336), notimexpix438432 (1447341085831462912),
 notimexpix438433 (1447341085831462913), ... (66 adds)]} 0 181
 
 INFO  - 2013-09-27 08:27:01.975;
 org.apache.solr.update.processor.LogUpdateProcessor; [inclive]
 webapp=/solr path=/update
 params={waitSearcher=truecommit=truewt=javabinversion=2softCommit=false}
 {commit=} 0 1065
 
 Note that the QTime doesn't represent the total amount of time for the
 request, because it only measures the part that's in under the control
 of the specific class that's generating the log - in this case
 LogUpdateProcessor.  It can't measure the time the servlet container
 takes to handle the HTTP conversation, or any part of the request that
 takes place in Solr classes called before or after LogUpdateProcessor.

I can illustrate the difference between QTime and the actual transaction
time by showing you the log entries from the application that correspond
exactly to the Solr log entries I shared:

INFO  - 2013-09-27 08:27:00.815; chain.c: Insert done, 66, time = 315
INFO  - 2013-09-27 08:27:01.976; chain.c: Commit done, time = 1161

The add request with 66 documents had a QTime of 181, but took 315
milliseconds.  The commit had a QTime of 1065, but actually took 1161
milliseconds.

Thanks,
Shawn



[NEWS] New Response Writer for Native PHP Solr Client

2010-06-22 Thread Israel Ekpo
Hi Solr users,

If you are using Apache Solr via PHP, I have some good news for you.

There is a new response writer for the PHP native extension, currently
available as a plugin.

This new feature adds a new response writer class to the
org.apache.solr.request package.

This class is used by the PHP Native Solr Client driver to prepare the query
response from Solr.

This response writer allows you to configure the way the data is serialized
for the PHP client.

You can use your own class name and you can also control how the properties
are serialized as well.

The formatting of the response data is very similar to the way it is
currently done by the PECL extension on the client side.

The only difference now is that this serialization is happening on the
server side instead.

You will find this new response writer particularly useful when dealing with
responses for

- highlighting
- admin threads responses
- more like this responses

to mention just a few

You can pass the objectClassName request parameter to specify the class
name to be used for serializing objects.

Please note that the class must be available on the client side to avoid a
PHP_Incomplete_Object error during the unserialization process.

You can also pass in the objectPropertiesStorageMode request parameter
with either a 0 (independent properties) or a 1 (combined properties).

These parameters can also be passed as a named list when loading the
response writer in the solrconfig.xml file

Having this control allows you to create custom objects which gives the
flexibility of implementing custom __get methods, ArrayAccess, Traversable
and Iterator interfaces on the PHP client side.

Until this class in incorporated into Solr, you simply have to copy the jar
file containing this plugin into your lib directory under $SOLR_HOME

The jar file is available here

https://issues.apache.org/jira/browse/SOLR-1967

Then set up the configuration as shown below and then restart your servlet
container

Below is an example configuration in solrconfig.xml

code
queryResponseWriter name=phpnative
class=org.apache.solr.request.PHPNativeResponseWriter
!-- You can choose a different class for your objects. Just make sure the
class is available in the client --
str name=objectClassNameSolrObject/str
!--
0 means OBJECT_PROPERTIES_STORAGE_MODE_INDEPENDENT
1 means OBJECT_PROPERTIES_STORAGE_MODE_COMBINED

In independed mode, each property is a separate property
In combined mode, all the properites are merged into a _properties array.
The combined mode allows you to create custom __getters and you could also
implement ArrayAccess, Iterator and Traversable
--
int name=objectPropertiesStorageMode0/int
/queryResponseWriter

code

Below is an example implementation on the PHP client side.

Support for specifying custom response writers will be available starting
from the 0.9.11 version (released today) of the PECL extension for Solr
currently available here

http://pecl.php.net/package/solr

Here is an example of how to use the new response writer with the PHP
client.

code
?php

class SolrClass
{
public $_properties = array();

public function __get($property_name) {

if (property_exists($this, $property_name)) { return $this-$property_name;
} else if (isset($_properties[$property_name])) { return
$_properties[$property_name]; }

return null;
}
}

$options = array
(
'hostname' = 'localhost',
'port' = 8983,
'path' = '/solr/'
);

$client = new SolrClient($options);

$client-setResponseWriter(phpnative);

$response = $client-ping();

$query = new SolrQuery();

$query-setQuery(:);

$query-set(objectClassName, SolrClass);
$query-set(objectPropertiesStorageMode, 1);

$response = $client-query($query);

$resp = $response-getResponse();

?
code

Documentation of the changes to the PECL extension are available here

http://docs.php.net/manual/en/solrclient.construct.php
http://docs.php.net/manual/en/solrclient.setresponsewriter.php

Please contact me at ie...@php.net, if you have any questions or comments.

-- 
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/


Solr client query vs Solr search query

2009-12-15 Thread insaneyogi3008

Hello,

I had this question to ask regarding building of a Solr query . On the solr
server running on a linux box my query that returns results is as follows ,
this one of course returns the search results 

http://ncbu-cam35-2:17003/apache-solr-1.4.0/profile/select/?q=Bangaloreversion=2.2start=0rows=10indent=on


However when I try to access the same Solr server using a webapp on tomcat
if I print out the query it comes out as : 

http://ncbu-cam35-2:17003/apache-solr-1.4.0/profile?q=bangaloreqt=/profilerows=100wt=javabinversion=1

Note the second query is missing the select clause among other things that
follow . This one does not return the results back to me . 

My question is am I building my query wrong in my client , could somebody
show me the way?

With Regards
Sri
-- 
View this message in context: 
http://old.nabble.com/Solr-client-query-vs-Solr-search-query-tp26802513p26802513.html
Sent from the Solr - User mailing list archive at Nabble.com.



Solr client query vs Solr search query

2009-12-15 Thread insaneyogi3008

Hello,

I had this question to ask regarding building of a Solr query . On the solr
server running on a linux box my query that returns results is as follows ,
this one of course returns the search results 

http://ncbu-cam35-2:17003/apache-solr-1.4.0/profile/select/?q=Bangaloreversion=2.2start=0rows=10indent=on


However when I try to access the same Solr server using a webapp on tomcat
if I print out the query it comes out as : 

http://ncbu-cam35-2:17003/apache-solr-1.4.0/profile?q=bangaloreqt=/profilerows=100wt=javabinversion=1

Note the second query is missing the select clause among other things that
follow . This one does not return the results back to me . 

My question is am I building my query wrong in my client , could somebody
show me the way?

With Regards
Sri
-- 
View this message in context: 
http://old.nabble.com/Solr-client-query-vs-Solr-search-query-tp26802634p26802634.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: [ANN] Apache Forrest/Cocoon based solr client plugin

2007-01-09 Thread Yonik Seeley

Oops, I replied in the forrest form:
http://www.nabble.com/-ANN--Apache-Forrest-Cocoon-based-solr-client-plugin-tf2937202.html#a8251774
-Yonik

On 1/7/07, Thorsten Scherler [EMAIL PROTECTED] wrote:

I am happy to announce that I just add a Apache Forrest based Apache
Solr client plugin to the forrest whiteboard.


[ANN] Apache Forrest/Cocoon based solr client plugin

2007-01-07 Thread Thorsten Scherler
Hi all,

I am happy to announce that I just add a Apache Forrest based Apache
Solr client plugin to the forrest whiteboard. It may be from interest
for the ones using Apache Cocoon based Apache Forrest and Apache Lucene
based Apache Solr.

org.apache.forrest.plugin.output.solr generates Apache Solr documents
from Apache Forrest xdos. Further when run with the Apache Forrest
Dispatcher it provides a GUI to manage your project in solr and a search
interface to search your solr server.

The documentation and a couple of screenshots can be found at
http://forrest.apache.org/pluginDocs/plugins_0_80/org.apache.forrest.plugin.output.solr/

The source code can be found at
http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.solr/

Have fun with it and please provide feedback to this list.

salu2
-- 
thorsten

Together we stand, divided we fall! 
Hey you (Pink Floyd)