Re: Solr with Auto-suggest
Hi Ryan, I gone through your post https://issues.apache.org/jira/browse/SOLR-357 where you mention about prefix filter,can you tell me how to use that patch,and you mentioned to use the code as bellow, ... ... For using the above code is that you are using EdgeNGramFilterFactory or PrefixingFilterFactory. or the above code works for EdgeNGramFilterFactory,i am not clear about it,with out using the PrefixingFilterFactory patch, is that i can write the above code. And the next is "name" in copyFiled is "text" type or "string" type waiting for your reply, Regards, Rekha -- View this message in context: http://www.nabble.com/Solr-with-Auto-suggest-tp16880894p25530993.html Sent from the Solr - User mailing list archive at Nabble.com.
Issue on Facet field and exact match
Hi to all, While i am working with facet using solrj, i am using string filed in schema to avoid split in the word(i.e,Rekha dharshana, previously i was getting rekha separate word and dharshana separate word..),in order to avoid this in shema i use two fileds to index. My Schema.xml will look like this And this is my copy field.. This is my coding where i add fileds for blog details to solr, SolrInputDocument solrInputDocument = new SolrInputDocument(); solrInputDocument.addField("blogTitle","$Never Fails$"); solrInputDocument.addField("blogId","$Never Fails$"); solrInputDocument.addField("userId",1); This is my coding to add fileds for post details to solr.. solrInputDocument.addField("blogId","$Never Fails$"); solrInputDocument.addField("postId","$Never Fails post$"); solrInputDocument.addField("postTitle","$Never Fails post$"); solrInputDocument.addField("postMessage","$Never Fails post message$"); While i am quering it from solr, this is my coding.. SolrQuery queryOfMyBlog = new SolrQuery("blogId_exact:Never Fails"); queryOfMyBlog.setFacet(true); queryOfMyBlog.addFacetField("blogTitle_exact"); queryOfMyBlog.addFacetField("userId_exact"); queryOfMyBlog.addFacetField("blogId_exact"); queryOfMyBlog.setFacetMinCount(1); queryOfMyBlog.setIncludeScore(true); List facets = query.getFacetFields(); List listOfAllValues = new ArrayList(); System.out.println("inside facettt size"+facets.size()); for(FacetField facet : facets) { System.out.println("inside for"); List facetEntries = facet.getValues(); for(FacetField.Count fcount : facetEntries) { String s= fcount.getName(); listOfAllValues.add(s); System.out.println("BlogId"+s); } } In the above code it copies the field from blogId,blogTitle,userId to blogId_exact,blogTitle_exact,userId_exact,so that i can get the out put ,but while i am indexing it to solr i index the filed in this manner ie.. "$Never Fails$" this i do to get an exact search but i am not getting the exact search ,when i try to query only "Never Fails" it also brings and show me the "Success Never Fails" field to ..I need only to display Never Fails details of the particular blog,but i even get "Success Never Fails" along with that... what should i do for this to get exact match.. The above is my First Issue... The next issue is ,when i am querying the post details , the same thing i do ,to get the post details... SolrQuery queryOfMyPost = new SolrQuery("blogId_exact:$Success Never Fails$"); queryOfMyPost.setFacet(true); queryOfMyPost.addFacetField("blogId_exact"); queryOfMyPost.addFacetField("postId_exact"); queryOfMyPost.addFacetField("postTitle_exact"); queryOfMyPost.addFacetField("postMessage_exact"); queryOfMyPost.setFacetMinCount(1); queryOfMyPost.setIncludeScore(true); List facetsForPost = queryPost.getFacetFields(); List listOfAllFacetsForPost = new ArrayList(); System.out.println("inside facettt size"+facetsForPost); for(FacetField facetPost1 : facetsForPost) { System.out.println("inside for"+facetPost1); List facetEntries = facetPost1.getValues(); for(FacetField.Count fcount1 : facetEntries) { String s1= fcount1.getName(); listOfAllFacetsForPost.add(s1); System.out.println("Post details"+ s1); } } Here in the above facet filed postId_exact,postTitle_exact,postMessage_exact i get null values.. the copy filed has not been copied to those values.. so i get null values for this.. Please check my code and tell me where i am wrong... And clear my issue on exact match... Wailting for your reply.. Regards, Rekha. -- View this message in context: http://www.nabble.com/Issue-on-Facet-field-and-exact-match-tp25430457p25430457.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Random Display of result in solr(Can anyone please answer to this post )
Hi Team , Can anyone please answer to this post I have an issue while i am working with solr. I am working on blog module,here the user will be creating more blogs,and he can post on it and have several comments for post.For implementing this module i am using solr 1.4. When i get blog details of particular user, it brings the result in random manner for (ex:) If i am passing blogid in the query to get my details,the result i got as ,if i have 2 result from it This is the first result SolrDocument1{blogTitle=New Blog, blogId=New Blog, userId=1}] SolrDocument2{blogId=New Blog, postId=New Post, postTitle=New Post, postMessage=New Post Message, timestamp_post=Fri Sep 11 09:48:24 IST 2009}] SolrDocument3{blogTitle=ammu blog, blogId=ammu blog, userId=1}] The Second result SolrDocument1{blogTitle=New Blog, blogId=New Blog, userId=1}] SolrDocument2{blogTitle=ammu blog, blogId=ammu blog, userId=1}] SolrDocument3{blogId=New Blog, postId=New Post, postTitle=New Post, postMessage=New Post Message, timestamp_post=Fri Sep 11 09:48:24 IST 2009}] I am using solrj, when i am iterating the list i some times get ArrayIndexOutOfBoundException,because of my difference in the result. When i run again my code some other time ,it produces the proper result.so the list was changing all time. If anybody faced this type of problem ,please share with me.. And iam not able to get the specific thing ie if i am going to get blog details of particular user, so i will be passing blogtitle for ex: rekha blog , it is not giving only the rekha blog it also gives other blog which ends with blog (i..e sandhya blog,it brings even that and shows..). what should i do for this ,any specific query should be given ,i am using solrj.. using this how to make my query to get my prompt result. Waiting for your reply Regards, Rekha. dharhsana wrote: > > Hi to all, > > I have an issue while i am working with solr. > > I am working on blog module,here the user will be creating more blogs,and > he can post on it and have several comments for post.For implementing this > module i am using solr 1.4. > > When i get blog details of particular user, it brings the result in random > manner for > (ex:) If i am passing blogid in the query to get my details,the result i > got as ,if i have 2 result from it > > This is the first result > > SolrDocument1{blogTitle=New Blog, blogId=New Blog, userId=1}] > SolrDocument2{blogId=New Blog, postId=New Post, postTitle=New Post, > postMessage=New Post Message, timestamp_post=Fri Sep 11 09:48:24 IST > 2009}] > SolrDocument3{blogTitle=ammu blog, blogId=ammu blog, userId=1}] > > The Second result > SolrDocument1{blogTitle=New Blog, blogId=New Blog, userId=1}] > SolrDocument2{blogTitle=ammu blog, blogId=ammu blog, userId=1}] > SolrDocument3{blogId=New Blog, postId=New Post, postTitle=New Post, > postMessage=New Post Message, timestamp_post=Fri Sep 11 09:48:24 IST > 2009}] > > I am using solrj, when i am iterating the list i some times get > ArrayIndexOutOfBoundException,because of my difference in the result. > > When i run again my code some other time ,it produces the proper result.so > the list was changing all time. > > If anybody faced this type of problem ,please share with me.. > > And iam not able to get the specific thing ie if i am going to get blog > details of particular user, so i will be passing blogtitle for ex: rekha > blog , it is not giving only the rekha blog it also gives other blog which > ends with blog (i..e sandhya blog,it brings even that and shows..). > > what should i do for this ,any specific query should be given ,i am using > solrj.. using this how to make my query to get my prompt result. > > Waiting for your reply > > Regards, > > Rekha. > -- View this message in context: http://www.nabble.com/Random-Display-of-result-in-solr-tp25395746p25397538.html Sent from the Solr - User mailing list archive at Nabble.com.
Random Display of result in solr
Hi to all, I have an issue while i am working with solr. I am working on blog module,here the user will be creating more blogs,and he can post on it and have several comments for post.For implementing this module i am using solr 1.4. When i get blog details of particular user, it brings the result in random manner for (ex:) If i am passing blogid in the query to get my details,the result i got as ,if i have 2 result from it This is the first result SolrDocument1{blogTitle=New Blog, blogId=New Blog, userId=1}] SolrDocument2{blogId=New Blog, postId=New Post, postTitle=New Post, postMessage=New Post Message, timestamp_post=Fri Sep 11 09:48:24 IST 2009}] SolrDocument3{blogTitle=ammu blog, blogId=ammu blog, userId=1}] The Second result SolrDocument1{blogTitle=New Blog, blogId=New Blog, userId=1}] SolrDocument2{blogTitle=ammu blog, blogId=ammu blog, userId=1}] SolrDocument3{blogId=New Blog, postId=New Post, postTitle=New Post, postMessage=New Post Message, timestamp_post=Fri Sep 11 09:48:24 IST 2009}] I am using solrj, when i am iterating the list i some times get ArrayIndexOutOfBoundException,because of my difference in the result. When i run again my code some other time ,it produces the proper result.so the list was changing all time. If anybody faced this type of problem ,please share with me.. And iam not able to get the specific thing ie if i am going to get blog details of particular user, so i will be passing blogtitle for ex: rekha blog , it is not giving only the rekha blog it also gives other blog which ends with blog (i..e sandhya blog,it brings even that and shows..). what should i do for this ,any specific query should be given ,i am using solrj.. using this how to make my query to get my prompt result. Waiting for your reply Regards, Rekha. -- View this message in context: http://www.nabble.com/Random-Display-of-result-in-solr-tp25395746p25395746.html Sent from the Solr - User mailing list archive at Nabble.com.
Connection refused when excecuting the query
Hi to all, when i try to execute my query i get Connection refused ,can any one please tell me what should be done for this ,to make my solr run. org.apache.solr.client.solrj.SolrServerException: java.net.ConnectException: Connection refused: connect org.apache.solr.client.solrj.SolrServerException: java.net.ConnectException: Connection refused: connect at org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:471) at org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:242) at org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:89) at org.apache.solr.client.solrj.SolrServer.query(SolrServer.java:118) at com.cloud.seviceImpl.InsertToSolrServiceImpl.getMyBlogs(InsertToSolrServiceImpl.java:214) at com.cloud.struts.action.MyBlogAction.execute(MyBlogAction.java:42) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:567) at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:394) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454) at java.lang.Thread.run(Thread.java:595) Caused by: java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) at java.net.Socket.connect(Socket.java:519) at java.net.Socket.connect(Socket.java:469) at java.net.Socket.(Socket.java:366) at java.net.Socket.(Socket.java:239) at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:80) at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:122) at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707) at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361) at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387) at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323) at org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:415) with regrards, rekha -- View this message in context: http://www.nabble.com/Connection-refused-when-excecuting-the-query-tp25381486p25381486.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: TermsComponent
Hi, I have a requirement on Autocompletion search , iam using solr 1.4. Could you please tell me how you worked on that Terms component using solr 1.4, i could'nt find terms component in solr 1.4 which i have downloaded,is there anyother configuration should be done. Do you have code for autocompletion, please share wih me.. Regards Rekha tbenge wrote: > > Hi, > > I was looking at TermsComponent in Solr 1.4 as a way of building a > autocomplete function. I have a prototype working but noticed that terms > that have whitespace in them when indexed are absent the whitespace when > returned from the TermsComponent. > > Any ideas on why that may be happening? Am I just missing a configuration > option? > > Thanks, > > Todd > > -- View this message in context: http://www.nabble.com/TermsComponent-tp25302503p25362829.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Very Urjent
Hi Shalin Shekhar Mangar, I got some come from this site http://www.mattweber.org/2009/05/02/solr-autosuggest-with-termscomponent-and-jquery/ When i use that code in my project ,then only i came to know that there is no Termscomponent jar or plugin .. There is any other way for doing autocompletion search with out terms component. If so please tell me how to implement it. waiting for your reply Regards, Rekha. -- View this message in context: http://www.nabble.com/Very-Urjent-tp25359244p25360892.html Sent from the Solr - User mailing list archive at Nabble.com.
Very Urjent
Iam new to solr, My requirement is that,i need to have Autocompletion text box in my blog application,i need to know how to implement it with solr 1.4. I have gone through TermsComponent,but TermsComponent is not available in solr 1.4 which i have downloaded. Can any one please help out ,how to do autosuggest using solr 1.4,and provide me the code along with schema.xml and solrConfig.xml.So that it will be useful for me to know how to configure it. Waiting for your reply. Regards, Rekha. -- View this message in context: http://www.nabble.com/Very-Urjent-tp25359244p25359244.html Sent from the Solr - User mailing list archive at Nabble.com.
Analyser doubt in solr
Hi to all, I am using solr for searching in my application. my problem is , for example if i want to serach "what is java?" means , The highly matched result from solr should come (ie java based result ,which should be a lose search ) .what kind of ANALYSER i have to use and how to configure the analyser in solr . Iam waiting for the reply with regards, T.Rekha. -- View this message in context: http://www.nabble.com/Analyser-doubt-in-solr-tp17770142p17770142.html Sent from the Solr - User mailing list archive at Nabble.com.
hi
hi , when iam running my solr i offen get corrupted index exception,i don't no how to solve this problem,can any one plzz help out in solving this problem.. INFO: adding requestHandler: /debug/dump=solr.DumpRequestHandler May 26, 2008 8:48:39 AM org.apache.solr.core.SolrException log SEVERE: java.lang.RuntimeException: org.apache.lucene.index.CorruptIndexExceptio n: Unknown format version: -4 at org.apache.solr.core.SolrCore.getSearcher(SolrCore.java:433) at org.apache.solr.core.SolrCore.(SolrCore.java:216) at org.apache.solr.core.SolrCore.getSolrCore(SolrCore.java:177) at org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.ja va:69) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(Applicatio nFilterConfig.java:221) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(Applica tionFilterConfig.java:302) at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFi lterConfig.java:78) at org.apache.catalina.core.StandardContext.filterStart(StandardContext. java:3635) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4 222) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase .java:760) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:74 0) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.ja va:626) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.j ava:553) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488 ) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java :311) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl eSupport.java:120) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022) at org.apache.catalina.core.StandardHost.start(StandardHost.java:736) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443 ) at org.apache.catalina.core.StandardService.start(StandardService.java:4 48) at org.apache.catalina.core.StandardServer.start(StandardServer.java:700 ) at org.apache.catalina.startup.Catalina.start(Catalina.java:552) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433) Caused by: org.apache.lucene.index.CorruptIndexException: Unknown format version : -4 at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:204) at org.apache.lucene.index.IndexReader$1.doBody(IndexReader.java:189) at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfo s.java:610) at org.apache.lucene.index.IndexReader.open(IndexReader.java:184) at org.apache.lucene.index.IndexReader.open(IndexReader.java:148) at org.apache.solr.search.SolrIndexSearcher.(SolrIndexSearcher.jav a:87) at org.apache.solr.core.SolrCore.getSearcher(SolrCore.java:424) ... 30 more May 26, 2008 8:48:39 AM org.apache.solr.servlet.SolrDispatchFilter init INFO: SolrDispatchFilter.init() done May 26, 2008 8:48:39 AM org.apache.solr.servlet.SolrServlet init INFO: SolrServlet.init() May 26, 2008 8:48:39 AM org.apache.solr.servlet.SolrServlet init INFO: SolrServlet.init() done May 26, 2008 8:48:39 AM org.apache.solr.servlet.SolrUpdateServlet init INFO: SolrUpdateServlet.init() done with regards, T.Rekha. -- View this message in context: http://www.nabble.com/hi-tp17465265p17465265.html Sent from the Solr - User mailing list archive at Nabble.com.
hi umar,tim
hi,Thank you for your reply. delete operation worked for both query and by id , can u plz help me out for analyzer (what u mean by default schema xml),i tried out by using 'filed name as text' even i didnt get the loose search... can u send me that default schema. with regards , T.Rekha -- View this message in context: http://www.nabble.com/hi-umar%2Ctim-tp17289116p17289116.html Sent from the Solr - User mailing list archive at Nabble.com.
hi umar
hi,thank u for ur reply.. As per ur suggestion ,the index has been deleted ,can you plz help me out for deleting the index by 'ID' (but not the whole index). For analyzer,i have given the text as the fileld name ,but i didnt get the proper loose search can u give me some more examples for analyzer... waiting for ur reply, with regards, T.Rekha. -- View this message in context: http://www.nabble.com/hi-umar-tp17276060p17276060.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: solr search
hi umar, thanks for ur reply ... As per ur sugesstion i have done the search,it perfectly worked well... i have two more question 1) how to delete an id in a solr i tried some example but there is no changes in my index. 2) How to use an Analyzer for querying and indexing, for example i have indexed java1.5,java1.6,java in the index, while iam searching i entered a query like "what is java", it is not fetching any results ,but only if i give java or java is object oriented language something like that only i can see the result. I have no idea of what analyser i have to use. waiting for ur reply, Thank u. with regards Rekha. -- View this message in context: http://www.nabble.com/solr-search-tp17249602p17273000.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: solr search
hello umar, Thank u so much for replying me. I have a requirement that i have to display first 10 values in jsp page . In that page itself i have (NEXT) button while clicking, it should query the next 10 records from solr.How can i implement this can u give some example for this. As per u said , i understood that we have to pass the (http://localhost:8080/solr/select/start=0&row=10) as a parameter.But i dont know to implement this. http://localhost:8080/solr/select/(here how can i specify the limit of rows return from the solr response xml ) thanks in advance very urgent -- View this message in context: http://www.nabble.com/solr-search-tp17249602p17253212.html Sent from the Solr - User mailing list archive at Nabble.com.
solr search
hi this is rekha,iam new to solr.. I need to search the solr with limits,for example if we are going to get 100 records ,those records should be seperated to 10 records each in seperate xml .can any one give me the sample code. with regards, T.Rekha. -- View this message in context: http://www.nabble.com/solr-search-tp17249602p17249602.html Sent from the Solr - User mailing list archive at Nabble.com.