Index a null text field

2011-11-24 Thread jawedshamshedi
Hi all,

I am indexing a table that has a field by the name of solr_keywords of type
text in mysql. And it contains null values also. While creating index in
solr, this field is not getting indexed.

Any help will be appreciated. 

Thanks


--
View this message in context: 
http://lucene.472066.n3.nabble.com/Index-a-null-text-field-tp3533636p3533636.html
Sent from the Solr - User mailing list archive at Nabble.com.


RE: Index a null text field

2011-11-24 Thread jawedshamshedi
Hi Cody,

Thanks for the reply.

Please find the detail of that I am doing. 

Yes, I am using dataimport handler and the code snippet of it from
solrconfig.xml is given below.



data-config.xml



The data-config.xml is give below.




 












schema.xml


 


   
 
 
 
  
 
  

 

 
 un_id

 
 ST_Name

he date type in mysql is given below.

keyword text
start_bidprice  float(12,2)
end_datedatetime
start_bidprice  float(12,2)
start_date  datetime


for some fields that are simple float, there index are being created. I also
added this in data-config.xml's url zeroDateTimeBehavior=convertToNull but
no avail.

Please help Thanks in advance.



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Index-a-null-text-field-tp3533636p3535376.html
Sent from the Solr - User mailing list archive at Nabble.com.


SolrPhpClient not working

2012-01-19 Thread jawedshamshedi
 0  down vote  favorite
share [fb] share [tw]


I have a question. SolrphpClient is not working with multicore.

I have two cores in my solr say core1 and core2. While creating object of
SolrPhpClient I am using the following syntax.

$solr = new Apache_Solr_Service('192.168.12.226', '8983', 'solr/core1/' );

It's giving a fatal error...

Fatal error: Uncaught exception 'Exception' with message '"500" Status:
null_javalangNullPointerException_at_javaioStringReaderinitStringReaderjava50__at_orgapachelucenequeryParserQue'
in C:\xampp\htdocs\solrsite\SolrPhpClient\Apache\Solr\Service.php:334 Stack
trace: #0
C:\xampp\htdocs\solrsite\SolrPhpClient\Apache\Solr\Service.php(964):
Apache_Solr_Service->_sendRawGet('http://192.168') #1
C:\xampp\htdocs\solrsite\script\productlist.php(403):
Apache_Solr_Service->search(NULL, 0, 15, Array) #2
C:\xampp\htdocs\solrsite\index.php(510): include_once('C:\xampp\htdocs...')
#3 {main} thrown in
C:\xampp\htdocs\solrsite\SolrPhpClient\Apache\Solr\Service.php on line 334

The got the syntax that is causing the error on the above said line is:

http://192.168.12.226:8983/solr/core1/select?fl=ST_StockCode%2CST_ItemCategory%2CST_Stone1%2CST_Stone2%2CST_LowPrice%2CST_WebPrice%2CST_Name%2CST_ArticleType%2CST_MetalType%2CST_HighPrice%2CST_ImageFileName%2Cis_clearance%2CGroupName%2CFreePnp%2CST_ItemSize%2CST_MarketPrice&sort=ST_Name+desc&version=1.2&wt=json&json.nl=map&start=0&rows=1

And if I run this query in url of solr , I get this error:

HTTP ERROR: 500

null

java.lang.NullPointerException
at java.io.StringReader.(StringReader.java:50)
at org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:197)
at 
org.apache.solr.search.LuceneQParser.parse(LuceneQParserPlugin.java:78)
at org.apache.solr.search.QParser.getQuery(QParser.java:131)
at
org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:89)
at
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:174)
at
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1316)
at
org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:338)
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:241)
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.headerComplete(HttpConnection.java:821)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:513)
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)

RequestURI=/solr/stock/select


Solr is working fine in admin part

Any help will be appreciated


--
View this message in context: 
http://lucene.472066.n3.nabble.com/SolrPhpClient-not-working-tp3672380p3672380.html
Sent from the Solr - User mailing list archive at Nabble.com.


Search within words

2012-01-20 Thread jawedshamshedi
Hi all,

I want to search a string in the same way as mysql like does i.e. 
if the word is say Sunrise then if i search rise then again sun rise should
come and if I choose sun then again sunrise should come and if I use sunrise
then again sunrise should come in search.

the search should no be case sensitive.

Will need a descriptive answer to do this as I am new to solr

Thanks


--
View this message in context: 
http://lucene.472066.n3.nabble.com/Search-within-words-tp3675210p3675210.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Search within words

2012-01-22 Thread jawedshamshedi
Hi
Thanks for the reply..
I am using NGramFilterFactory for this. But it's not working as desired.
Like I have a  field article_type that has been indexed using the below
mentioned field type.


 
   
   
   
 
 
   
   
 


The field definition for indexing is :

 
now the problem is that I have a value article_type field has values like
earrring and ring and it's required that when we search for ring earring
should also come. But it's not happening.

What else needs to be done in order to achieve this.

Any further help will be appreciated.  

Thanks



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Search-within-words-tp3675210p3681044.html
Sent from the Solr - User mailing list archive at Nabble.com.