RE: Special character indexing

2009-03-20 Thread Gargate, Siddharth
Hi Shalin,
Thanks for the suggestion. I tried following code, (not sure about the 
exact usage)

CommonsHttpSolrServer ess = new 
CommonsHttpSolrServer(http://localhost:8983/solr;);
ess.setRequestWriter(new BinaryRequestWriter());
SolrInputDocument solrdoc = new SolrInputDocument();
solrdoc.addField(id, Kimi);
solrdoc.addField(name, 03 Kimi Räikkönen );
ess.add(solrdoc);

But got following exception on the server

WARNING: The @Deprecated SolrUpdateServlet does not accept query parameters: 
wt=javabin
  If you are using solrj, make sure to register a request handler to /update 
rather then use this servlet.
  Add: requestHandler name=/update class=solr.XmlUpdateRequestHandler  to 
your solrconfig.xml


Mar 20, 2009 3:14:48 PM org.apache.solr.common.SolrException log
SEVERE: Error processing legacy update 
command:com.ctc.wstx.exc.WstxUnexpectedCharException: Illegal character ((CTRL-
CHAR, code 1))
 at [row,col {unknown-source}]: [1,1]
at 
com.ctc.wstx.sr.StreamScanner.throwInvalidSpace(StreamScanner.java:675)
at 
com.ctc.wstx.sr.StreamScanner.throwInvalidSpace(StreamScanner.java:660)
at 
com.ctc.wstx.sr.BasicStreamReader.readSpacePrimary(BasicStreamReader.java:4916)
at 
com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2003)
at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1069)
at 
org.apache.solr.handler.XmlUpdateRequestHandler.processUpdate(XmlUpdateRequestHandler.java:148)
at 
org.apache.solr.handler.XmlUpdateRequestHandler.doLegacyUpdate(XmlUpdateRequestHandler.java:393)
at 
org.apache.solr.servlet.SolrUpdateServlet.doPost(SolrUpdateServlet.java:78)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at 
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1098)
at 
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:295)
at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
at 
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
at 
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at 
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at 
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at 
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211)
at 
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at 
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:285)
at 
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:502)
at 
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:835)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:723)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:208)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:378)
at 
org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:226)
at 
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)

Thanks in advance for help.
Siddharth

-Original Message-
From: Shalin Shekhar Mangar [mailto:shalinman...@gmail.com] 
Sent: Friday, March 20, 2009 10:35 AM
To: solr-user@lucene.apache.org
Subject: Re: Special character indexing

On Fri, Mar 20, 2009 at 10:17 AM, Gargate, Siddharth sgarg...@ptc.comwrote:

 I tried with Jetty but the same issue. Just a guess, but looks like 
 the fix for SOLR-973 might have introduced this issue.


I'm not sure how SOLR-973 can cause this issue. Can you try using the 
BinaryRequestWriter and see if it succeeds?

http://wiki.apache.org/solr/Solrj#head-ddc28af4033350481a3cbb27bc1d25bffd801af0

--
Regards,
Shalin Shekhar Mangar.


FW: Special character indexing

2009-03-20 Thread Gargate, Siddharth
Thanks Shalin,

Adding BinaryUpdateRequestHandler solved the issue. Thank you very much. 

Just one query, shouldn't XmlUpdateRequestHandler also work for these 
characters? I saw another user mentioning the same issue and it was working 
with DirectXmlRequest. 



-Original Message-
From: Shalin Shekhar Mangar [mailto:shalinman...@gmail.com] 
Sent: Friday, March 20, 2009 3:58 PM
To: solr-user@lucene.apache.org
Subject: Re: Special character indexing

On Fri, Mar 20, 2009 at 3:19 PM, Gargate, Siddharth sgarg...@ptc.comwrote:

 Hi Shalin,
Thanks for the suggestion. I tried following code, (not sure 
 about the exact usage)

CommonsHttpSolrServer ess = new CommonsHttpSolrServer(
 http://localhost:8983/solr;);
ess.setRequestWriter(new BinaryRequestWriter());
SolrInputDocument solrdoc = new SolrInputDocument();
solrdoc.addField(id, Kimi);
solrdoc.addField(name, 03 Kimi Räikkönen );
ess.add(solrdoc);

 But got following exception on the server

 WARNING: The @Deprecated SolrUpdateServlet does not accept query
 parameters: wt=javabin
  If you are using solrj, make sure to register a request handler to 
 /update rather then use this servlet.
  Add: requestHandler name=/update 
 class=solr.XmlUpdateRequestHandler  to your solrconfig.xml


Yes, you need to add the following to your solrconfig.xml

requestHandler name=/update/javabin
class=solr.BinaryUpdateRequestHandler /

--
Regards,
Shalin Shekhar Mangar.


Re: Special character indexing

2009-03-20 Thread Shalin Shekhar Mangar
On Fri, Mar 20, 2009 at 3:19 PM, Gargate, Siddharth sgarg...@ptc.comwrote:

 Hi Shalin,
Thanks for the suggestion. I tried following code, (not sure about
 the exact usage)

CommonsHttpSolrServer ess = new CommonsHttpSolrServer(
 http://localhost:8983/solr;);
ess.setRequestWriter(new BinaryRequestWriter());
SolrInputDocument solrdoc = new SolrInputDocument();
solrdoc.addField(id, Kimi);
solrdoc.addField(name, 03 Kimi Räikkönen );
ess.add(solrdoc);

 But got following exception on the server

 WARNING: The @Deprecated SolrUpdateServlet does not accept query
 parameters: wt=javabin
  If you are using solrj, make sure to register a request handler to /update
 rather then use this servlet.
  Add: requestHandler name=/update class=solr.XmlUpdateRequestHandler 
 to your solrconfig.xml


Yes, you need to add the following to your solrconfig.xml

requestHandler name=/update/javabin
class=solr.BinaryUpdateRequestHandler /

-- 
Regards,
Shalin Shekhar Mangar.


Re: FW: Special character indexing

2009-03-20 Thread Shalin Shekhar Mangar
On Fri, Mar 20, 2009 at 4:13 PM, Gargate, Siddharth sgarg...@ptc.comwrote:

 Thanks Shalin,

 Adding BinaryUpdateRequestHandler solved the issue. Thank you very much.

 Just one query, shouldn't XmlUpdateRequestHandler also work for these
 characters? I saw another user mentioning the same issue and it was working
 with DirectXmlRequest.


It should. I'll run a few tests to see where is the problem.

-- 
Regards,
Shalin Shekhar Mangar.


Re: Special character indexing

2009-03-19 Thread Koji Sekiguchi

Gargate, Siddharth wrote:

Hi all,
I am trying to index words containing special characters like 'Räikkönen'. 
Using EmbeddedSolrServer indexing is working fine, but if I use 
CommonHttpSolrServer then it is indexing garbage values.
I am using Solr 1.4 and set URLEcoding as UTF-8 in tomcat. Is this a known 
issue or am I doing something wrong?

Thanks,
Siddharth

  

Can you use Jetty and index 'Räikkönen' via CommonsHttpSolrServer?
If problem gone, something missing in the config of Tomcat...

Koji



RE: Special character indexing

2009-03-19 Thread Gargate, Siddharth
I tried with Jetty but the same issue. Just a guess, but looks like the fix for 
SOLR-973 might have introduced this issue. 

Thanks,
Siddharth 

-Original Message-
From: Koji Sekiguchi [mailto:k...@r.email.ne.jp] 
Sent: Friday, March 20, 2009 6:22 AM
To: solr-user@lucene.apache.org
Subject: Re: Special character indexing

Gargate, Siddharth wrote:
 Hi all,
 I am trying to index words containing special characters like 'Räikkönen'. 
 Using EmbeddedSolrServer indexing is working fine, but if I use 
 CommonHttpSolrServer then it is indexing garbage values.
 I am using Solr 1.4 and set URLEcoding as UTF-8 in tomcat. Is this a known 
 issue or am I doing something wrong?

 Thanks,
 Siddharth

   
Can you use Jetty and index 'Räikkönen' via CommonsHttpSolrServer?
If problem gone, something missing in the config of Tomcat...

Koji



Re: Special character indexing

2009-03-19 Thread Shalin Shekhar Mangar
On Fri, Mar 20, 2009 at 10:17 AM, Gargate, Siddharth sgarg...@ptc.comwrote:

 I tried with Jetty but the same issue. Just a guess, but looks like the fix
 for SOLR-973 might have introduced this issue.


I'm not sure how SOLR-973 can cause this issue. Can you try using the
BinaryRequestWriter and see if it succeeds?

http://wiki.apache.org/solr/Solrj#head-ddc28af4033350481a3cbb27bc1d25bffd801af0

-- 
Regards,
Shalin Shekhar Mangar.


Special character indexing

2009-03-18 Thread Gargate, Siddharth
Hi all,
I am trying to index words containing special characters like 'Räikkönen'. 
Using EmbeddedSolrServer indexing is working fine, but if I use 
CommonHttpSolrServer then it is indexing garbage values.
I am using Solr 1.4 and set URLEcoding as UTF-8 in tomcat. Is this a known 
issue or am I doing something wrong?

Thanks,
Siddharth