Re: Wildcard Search and Filter in Solr
hey thanks ravi , ahmed and Erik for your reply. though its tough to change my solr version , still let me try out at 1.4 and see. Erik Hatcher-4 wrote: Note that the query analyzer output is NOT doing query _parsing_, but rather taking the string you passed and running it through the query analyzer only. When using the default query parser, Inte* will be a search for terms that begin with inte. It is odd that you're not finding it. But you're using a pretty old version of Solr and quite likely something here has been fixed since. Give Solr 1.4 a try. Erik On Jan 27, 2010, at 12:56 AM, ashokcz wrote: Hi just looked at the analysis.jsp and found out what it does during index / query Index Analyzer Intel intel intel intel intel intel Query Analyzer Inte* Inte* inte* inte inte inte int I think somewhere my configuration or my definition of the type text is wrong. This is my configuration . fieldType class=solr.TextField name=text analyzer type=index tokenizer class=solr.WhitespaceTokenizerFactory/ filter class=solr.LowerCaseFilterFactory/ filter catenateAll=0 catenateNumbers=0 catenateWords=0 class=solr.WordDelimiterFilterFactory generateNumberParts=1 generateWordParts=1/ filter class=solr.StopFilterFactory/ filter class=solr.TrimFilterFactory/ filter class=solr.PorterStemFilterFactory/ /analyzer analyzer type=query tokenizer class=solr.WhitespaceTokenizerFactory/ filter class=solr.SynonymFilterFactory expand=true ignoreCase=true synonyms=synonyms.txt/ filter class=solr.LowerCaseFilterFactory/ filter catenateAll=0 catenateNumbers=0 catenateWords=0 class=solr.WordDelimiterFilterFactory generateNumberParts=1 generateWordParts=1/ filter class=solr.StopFilterFactory/ filter class=solr.TrimFilterFactory/ filter class=solr.PorterStemFilterFactory/ /analyzer /fieldType I think i am missing some basic configuration for doing wildcard searches . but could not figure it out . can someone help please Ahmet Arslan wrote: Hi , I m trying to use wildcard keywords in my search term and filter term . but i didnt get any results. Searched a lot but could not find any lead . Can someone help me in this. i m using solr 1.2.0 and have few records indexed with vendorName value as Intel In solr admin interface i m trying to do the search like this http://localhost:8983/solr/select?indent=onversion=2.2q=intelstart=0rows=10fl=*%2Cscoreqt=standardwt=standardexplainOther=hl.fl= and i m getting the result properly but when i use q=inte* no records are returned. the same is the case for Filter Query on using fq=VendorName:Intel i get my results. but on using fq=VendorName:Inte* no results are returned. I can guess i doing mistake in few obvious things , but could not figure it out .. Can someone pls help me out :) :) If q=intel returns documents while q=inte* does not, it means that fieldType of your defaultSearchField is reducing the token intel into something. Can you find out it by using /admin/anaysis.jsp what happens to Intel intel at index and query time? What is your defaultSearchField? Is it VendorName? It is expected that fq=VendorName:Intel returns results while fq=VendorName:Inte* does not. Because prefix queries are not analyzed. But it is strange that q=inte* does not return anything. Maybe your index analyzer is reducing Intel into int or ıntel? I am not 100% sure but solr 1.2.0 may use default locale in lowercase operation. What is your default locale? It is better to see what happens word Intel using analysis.jsp page. -- View this message in context: http://old.nabble.com/Wildcard-Search-and-Filter-in-Solr-tp27306734p27334486.html Sent from the Solr - User mailing list archive at Nabble.com. -- View this message in context: http://old.nabble.com/Wildcard-Search-and-Filter-in-Solr-tp27306734p27405151.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Wildcard Search and Filter in Solr
Hi just looked at the analysis.jsp and found out what it does during index / query Index Analyzer Intel intel intel intel intel intel Query Analyzer Inte* Inte* inte* inte inte inte int I think somewhere my configuration or my definition of the type text is wrong. This is my configuration . fieldType class=solr.TextField name=text analyzer type=index tokenizer class=solr.WhitespaceTokenizerFactory/ filter class=solr.LowerCaseFilterFactory/ filter catenateAll=0 catenateNumbers=0 catenateWords=0 class=solr.WordDelimiterFilterFactory generateNumberParts=1 generateWordParts=1/ filter class=solr.StopFilterFactory/ filter class=solr.TrimFilterFactory/ filter class=solr.PorterStemFilterFactory/ /analyzer analyzer type=query tokenizer class=solr.WhitespaceTokenizerFactory/ filter class=solr.SynonymFilterFactory expand=true ignoreCase=true synonyms=synonyms.txt/ filter class=solr.LowerCaseFilterFactory/ filter catenateAll=0 catenateNumbers=0 catenateWords=0 class=solr.WordDelimiterFilterFactory generateNumberParts=1 generateWordParts=1/ filter class=solr.StopFilterFactory/ filter class=solr.TrimFilterFactory/ filter class=solr.PorterStemFilterFactory/ /analyzer /fieldType I think i am missing some basic configuration for doing wildcard searches . but could not figure it out . can someone help please Ahmet Arslan wrote: Hi , I m trying to use wildcard keywords in my search term and filter term . but i didnt get any results. Searched a lot but could not find any lead . Can someone help me in this. i m using solr 1.2.0 and have few records indexed with vendorName value as Intel In solr admin interface i m trying to do the search like this http://localhost:8983/solr/select?indent=onversion=2.2q=intelstart=0rows=10fl=*%2Cscoreqt=standardwt=standardexplainOther=hl.fl= and i m getting the result properly but when i use q=inte* no records are returned. the same is the case for Filter Query on using fq=VendorName:Intel i get my results. but on using fq=VendorName:Inte* no results are returned. I can guess i doing mistake in few obvious things , but could not figure it out .. Can someone pls help me out :) :) If q=intel returns documents while q=inte* does not, it means that fieldType of your defaultSearchField is reducing the token intel into something. Can you find out it by using /admin/anaysis.jsp what happens to Intel intel at index and query time? What is your defaultSearchField? Is it VendorName? It is expected that fq=VendorName:Intel returns results while fq=VendorName:Inte* does not. Because prefix queries are not analyzed. But it is strange that q=inte* does not return anything. Maybe your index analyzer is reducing Intel into int or ıntel? I am not 100% sure but solr 1.2.0 may use default locale in lowercase operation. What is your default locale? It is better to see what happens word Intel using analysis.jsp page. -- View this message in context: http://old.nabble.com/Wildcard-Search-and-Filter-in-Solr-tp27306734p27334486.html Sent from the Solr - User mailing list archive at Nabble.com.
Wildcard Search and Filter in Solr
Hi , I m trying to use wildcard keywords in my search term and filter term . but i didnt get any results. Searched a lot but could not find any lead . Can someone help me in this. this is my schema.xml entries field indexed=true name=VendorName stored=true type=text/ field indexed=true name=InvoiceNo stored=true type=text/ and this is my field type definition for text field fieldType class=solr.TextField name=text analyzer type=index tokenizer class=solr.WhitespaceTokenizerFactory/ filter class=solr.LowerCaseFilterFactory/ filter catenateAll=0 catenateNumbers=0 catenateWords=0 class=solr.WordDelimiterFilterFactory generateNumberParts=1 generateWordParts=1/ filter class=solr.StopFilterFactory/ filter class=solr.TrimFilterFactory/ filter class=solr.PorterStemFilterFactory/ /analyzer analyzer type=query tokenizer class=solr.WhitespaceTokenizerFactory/ filter class=solr.SynonymFilterFactory expand=true ignoreCase=true synonyms=synonyms.txt/ filter class=solr.LowerCaseFilterFactory/ filter catenateAll=0 catenateNumbers=0 catenateWords=0 class=solr.WordDelimiterFilterFactory generateNumberParts=1 generateWordParts=1/ filter class=solr.StopFilterFactory/ filter class=solr.TrimFilterFactory/ filter class=solr.PorterStemFilterFactory/ /analyzer /fieldType i m using solr 1.2.0 and have few records indexed with vendorName value as Intel In solr admin interface i m trying to do the search like this http://localhost:8983/solr/select?indent=onversion=2.2q=intelstart=0rows=10fl=*%2Cscoreqt=standardwt=standardexplainOther=hl.fl= and i m getting the result properly but when i use q=inte* no records are returned. the same is the case for Filter Query on using fq=VendorName:Intel i get my results. but on using fq=VendorName:Inte* no results are returned. I can guess i doing mistake in few obvious things , but could not figure it out .. Can someone pls help me out :) :) Thanks All --- Ashok -- View this message in context: http://old.nabble.com/Wildcard-Search-and-Filter-in-Solr-tp27306734p27306734.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Solr date and string search problem
. and the requestHandler configuration that it is used against. On Sat, Nov 14, 2009 at 4:16 AM, ashokcz ashokkumar.gane...@tcs.com wrote: Hi , I have been using solr1.2 for a year and now i m facing a weird problem. Till now i have used only string and number solr types for the search field . and whatever string the users are trying to search will pass it on to the search engine and it will find in appropraite fields and return me the results. But now i have added a another field with type DATE and made it as a search field. so what happens is whatever string that i m giving to solr tries to convert to date and throws me an error. Nov 14, 2009 4:36:05 PM org.apache.solr.core.SolrException log SEVERE: org.apache.solr.core.SolrException: Invalid Date String:'Behavior' at org.apache.solr.schema.DateField.toInternal(DateField.java:108) at org.apache.solr.schema.FieldType$DefaultAnalyzer$1.next(FieldType.java:298) at org.apache.lucene.queryParser.QueryParser.getFieldQuery(QueryParser.java:437) at org.apache.solr.search.SolrQueryParser.getFieldQuery(SolrQueryParser.java:78) at org.apache.solr.util.SolrPluginUtils$DisjunctionMaxQueryParser.getFieldQuery(SolrPluginUtils.java:774) at org.apache.solr.util.SolrPluginUtils$DisjunctionMaxQueryParser.getFieldQuery(SolrPluginUtils.java:762) at org.apache.lucene.queryParser.QueryParser.Term(QueryParser.java:1092) at org.apache.lucene.queryParser.QueryParser.Clause(QueryParser.java:979) at org.apache.lucene.queryParser.QueryParser.Query(QueryParser.java:907) at org.apache.lucene.queryParser.QueryParser.TopLevelQuery(QueryParser.java:896) at org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:146) at org.apache.solr.request.DisMaxRequestHandler.handleRequestBody(DisMaxRequestHandler.java:238) at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:77) at org.apache.solr.core.SolrCore.execute(SolrCore.java:706) at com.tcs.mighty.cb.service.CoreEntitySearcherImpl.solrSearch(CoreEntitySearcherImpl.java:896) at com.tcs.mighty.cb.service.CoreEntitySearcherImpl.search(CoreEntitySearcherImpl.java:342) at com.tcs.mighty.cb.service.CoreEntitySearcherImpl.handleGetSearchResults(CoreEntitySearcherImpl.java:52) at com.tcs.mighty.cb.service.CoreEntitySearcherBase.getSearchResults(CoreEntitySearcherBase.java:122) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:287) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148) at org.springframework.orm.hibernate3.HibernateInterceptor.invoke(HibernateInterceptor.java:97) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176) at $Proxy141.getSearchResults(Unknown Source) at com.tcs.mighty.cb.service.ejb.CoreEntitySearcherBean.getSearchResults(CoreEntitySearcherBean.java:24) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:683) at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186) at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:72) at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84) at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:315) at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:148) at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:111) at org.jboss.ejb.plugins.LogInterceptor.invoke
Solr date and string search problem
Hi , I have been using solr1.2 for a year and now i m facing a weird problem. Till now i have used only string and number solr types for the search field . and whatever string the users are trying to search will pass it on to the search engine and it will find in appropraite fields and return me the results. But now i have added a another field with type DATE and made it as a search field. so what happens is whatever string that i m giving to solr tries to convert to date and throws me an error. Nov 14, 2009 4:36:05 PM org.apache.solr.core.SolrException log SEVERE: org.apache.solr.core.SolrException: Invalid Date String:'Behavior' at org.apache.solr.schema.DateField.toInternal(DateField.java:108) at org.apache.solr.schema.FieldType$DefaultAnalyzer$1.next(FieldType.java:298) at org.apache.lucene.queryParser.QueryParser.getFieldQuery(QueryParser.java:437) at org.apache.solr.search.SolrQueryParser.getFieldQuery(SolrQueryParser.java:78) at org.apache.solr.util.SolrPluginUtils$DisjunctionMaxQueryParser.getFieldQuery(SolrPluginUtils.java:774) at org.apache.solr.util.SolrPluginUtils$DisjunctionMaxQueryParser.getFieldQuery(SolrPluginUtils.java:762) at org.apache.lucene.queryParser.QueryParser.Term(QueryParser.java:1092) at org.apache.lucene.queryParser.QueryParser.Clause(QueryParser.java:979) at org.apache.lucene.queryParser.QueryParser.Query(QueryParser.java:907) at org.apache.lucene.queryParser.QueryParser.TopLevelQuery(QueryParser.java:896) at org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:146) at org.apache.solr.request.DisMaxRequestHandler.handleRequestBody(DisMaxRequestHandler.java:238) at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:77) at org.apache.solr.core.SolrCore.execute(SolrCore.java:706) at com.tcs.mighty.cb.service.CoreEntitySearcherImpl.solrSearch(CoreEntitySearcherImpl.java:896) at com.tcs.mighty.cb.service.CoreEntitySearcherImpl.search(CoreEntitySearcherImpl.java:342) at com.tcs.mighty.cb.service.CoreEntitySearcherImpl.handleGetSearchResults(CoreEntitySearcherImpl.java:52) at com.tcs.mighty.cb.service.CoreEntitySearcherBase.getSearchResults(CoreEntitySearcherBase.java:122) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:287) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148) at org.springframework.orm.hibernate3.HibernateInterceptor.invoke(HibernateInterceptor.java:97) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176) at $Proxy141.getSearchResults(Unknown Source) at com.tcs.mighty.cb.service.ejb.CoreEntitySearcherBean.getSearchResults(CoreEntitySearcherBean.java:24) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:683) at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186) at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:72) at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84) at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:315) at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:148) at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:111) at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191) at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122) at
Is Relational Mapping (foreign key) possible in solr ??
Hi i browsed through the solr docs and user forums and what i infer is we cant use solr to store Relational Mapping(foreign key) in solr . but just want to know if any chances of doing the same. I have two tables User table (with 1,00,000 entries ) and project table with (200 entries ). User table columns : userid , name ,country , location , etc. Project tables Columns : project name , description , business unit , project type . Here User Location , Country , Project Name , Project business unit , project type are faceted A user can be mapped to multiple projects. In solr i store the details like this [ { userId:1234; userName:ABC; Country:US; Location:NY; Project Name:Project1,Project2; Project Description:Project1,Project2; Project business unit:unit1,unit2; Project type:Type1,Type2 } ] With this structure i could get faceted details about both user data and project data . But here i face 2 Problems . 1.A project can be mapped to many users say 10,000 Users . So if i change a project name then i end up indexing 10,000 Records which is a very time consuming work. 2.for Fields like Project Description i could not find any proper delimiter . for other fields comma (,) is okay but being description i could not use any specific delimiter .This is not faceted but still in search results i need to take this out and show the project details in tabular format. and i use delimiter to split it .For other project fields like Project Name and Type i could do it but not for this Project Description field So i expect is there any way of storing the data as relational records like in user details where we will have field called project Id and data will be 1,2 which refers to project records primary key in solr and still preserve the faceted approach. As for my knowledge my guess is it cant be done ??? Am i correct ??? If so then how we can achieve the solutions to my problem?? Pls if someone could share some ideas it will be useful. -- View this message in context: http://www.nabble.com/Is-Relational-Mapping-%28foreign-key%29-possible-in-solrtp25955068p25955068.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Is Relational Mapping (foreign key) possible in solr ??
Hi Jerome , thanks for your response. I never knew about multivalued fields. Will give a try about it and see if that suits my need. But i dont understand this * You could have a mixed index with user and project entries in the same index, so if you search for a name, you'd find users and projects matching that name. Could you please tell me in detail as how i can do that. Jérôme Etévé wrote: Hi, here's what you could do: * Use multivalued fields instead of 'comma separated values', so you won't need a separator. * Store project identifiers in the user index. Denormalised projects informations in a user entry will fatally need re-indexing lot of user entries when project info changes. * You could have a mixed index with user and project entries in the same index, so if you search for a name, you'd find users and projects matching that name. Jerome. 2009/10/19 ashokcz ashokkumar.gane...@tcs.com: Hi i browsed through the solr docs and user forums and what i infer is we cant use solr to store Relational Mapping(foreign key) in solr . but just want to know if any chances of doing the same. I have two tables User table (with 1,00,000 entries ) and project table with (200 entries ). User table columns : userid , name ,country , location , etc. Project tables Columns : project name , description , business unit , project type . Here User Location , Country , Project Name , Project business unit , project type are faceted A user can be mapped to multiple projects. In solr i store the details like this [ { userId:1234; userName:ABC; Country:US; Location:NY; Project Name:Project1,Project2; Project Description:Project1,Project2; Project business unit:unit1,unit2; Project type:Type1,Type2 } ] With this structure i could get faceted details about both user data and project data . But here i face 2 Problems . 1.A project can be mapped to many users say 10,000 Users . So if i change a project name then i end up indexing 10,000 Records which is a very time consuming work. 2.for Fields like Project Description i could not find any proper delimiter . for other fields comma (,) is okay but being description i could not use any specific delimiter .This is not faceted but still in search results i need to take this out and show the project details in tabular format. and i use delimiter to split it .For other project fields like Project Name and Type i could do it but not for this Project Description field So i expect is there any way of storing the data as relational records like in user details where we will have field called project Id and data will be 1,2 which refers to project records primary key in solr and still preserve the faceted approach. As for my knowledge my guess is it cant be done ??? Am i correct ??? If so then how we can achieve the solutions to my problem?? Pls if someone could share some ideas it will be useful. -- View this message in context: http://www.nabble.com/Is-Relational-Mapping-%28foreign-key%29-possible-in-solrtp25955068p25955068.html Sent from the Solr - User mailing list archive at Nabble.com. -- Jerome Eteve. http://www.eteve.net jer...@eteve.net -- View this message in context: http://www.nabble.com/Is-Relational-Mapping-%28foreign-key%29-possible-in-solrtp25955068p25969540.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: storing multiple type of records (Parent - Child Relationship)
thanks Avlesh for your reply. ya even i had that idea . but the problem is project data could change very rapdily. so in that case i will end up changing the associated user details . say i have just 100 Project records but 1,00,000 user records . then changing one project record means changing associated all user records .may be it will go to 1000's. so any idea of how to do it ?? or any suggestions for that ?? Avlesh Singh wrote: but is there a way where we can store user records separately and project records separately. and jut give the link in solr ?? like mentioned below and still making it searchable and facetable ?? With single core, unfortunately not. Denormalizing data for storage and searches is a regular practice in Solr. It might not sound proper if you try to do this with heavily normalized data but there nothing wrong about it. To be specific, in your case, the fields to facet and search upon are designed correctly. My understanding is that you need the relationships to be preserved only for display. Right? If yes, then you can always create an untokenized field, say string, and store all the project specific data in some delimited format. e.g. in your case - projectName$$projectBU$$projectLocation etc. This data can be interpreted in your application to convert it back into a proper relational data structure for each document in the result. Cheers Avlesh On Thu, Oct 15, 2009 at 9:57 AM, ashokcz ashokkumar.gane...@tcs.com wrote: Hi All , I have a specific requirement of storing multiple type of records. but dont know how to do it . First let me tell the requirement. I have a table called user table and a user can be mapped to multiple projects. User table details are User Name , User Id , address , and other details . I have stored them in solr but now the mapping between user and project has to be stored . Project table have (project name , location , business unit ,etc) I can still go ahead and store user has single record with project details as indvidual fields , like UserId:user1 UserAddress: india ProjectNames: project1,project2 ProjectBU: retail , finance ProjectLocation:UK,US Here i will search in fields like UserId , ProjectBU ,ProjectLocation and have made UserAddress, ProjectLocation as facets but is there a way where we can store user records separately and project records separately . and jut give the link in solr ?? like mentioned below and still making it searchable and facetable ?? User Details = UserId:user1 UserAddress: india ProjectId:1,2 Project Details == ProjectId:1 ProjectNames: project1 ProjectBU: retail ProjectLocation:UK ProjectId:2 ProjectNames: project2 ProjectBU:finance ProjectLocation:US -- View this message in context: http://www.nabble.com/storing-multiple-type-of-records-%28Parent---Child-Relationship%29-tp25902894p25902894.html Sent from the Solr - User mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/storing-multiple-type-of-records-%28Parent---Child-Relationship%29-tp25902894p25903679.html Sent from the Solr - User mailing list archive at Nabble.com.
storing multiple type of records (Parent - Child Relationship)
Hi All , I have a specific requirement of storing multiple type of records. but dont know how to do it . First let me tell the requirement. I have a table called user table and a user can be mapped to multiple projects. User table details are User Name , User Id , address , and other details . I have stored them in solr but now the mapping between user and project has to be stored . Project table have (project name , location , business unit ,etc) I can still go ahead and store user has single record with project details as indvidual fields , like UserId:user1 UserAddress: india ProjectNames: project1,project2 ProjectBU: retail , finance ProjectLocation:UK,US Here i will search in fields like UserId , ProjectBU ,ProjectLocation and have made UserAddress, ProjectLocation as facets but is there a way where we can store user records separately and project records separately . and jut give the link in solr ?? like mentioned below and still making it searchable and facetable ?? User Details = UserId:user1 UserAddress: india ProjectId:1,2 Project Details == ProjectId:1 ProjectNames: project1 ProjectBU: retail ProjectLocation:UK ProjectId:2 ProjectNames: project2 ProjectBU:finance ProjectLocation:US -- View this message in context: http://www.nabble.com/storing-multiple-type-of-records-%28Parent---Child-Relationship%29-tp25902894p25902894.html Sent from the Solr - User mailing list archive at Nabble.com.
Getting Facet Count of combination of fields
Hi all, i have a scenario where i need to get facet count for combination of fields. Say i have two fields Manufacturer and Year of manufacture. I search for something and it gives me 15 results and my facet count as like this : Manufacturer : Nokia(5);Motorola(7);iphone(3) Year of manufacture : 2007 (4) ; 2008 (4) 2009 (7). But what i need is combination of count . Say Nokia - 2007 - 1 Nokia - 2008 - 1 Nokia - 2009 - 2 Somethig like this is there any way we can get this kind of facet counts from single solr search hits ??? -- View this message in context: http://www.nabble.com/Getting-Facet-Count-of-combination-of-fields-tp24511923p24511923.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Getting Facet Count of combination of fields
Hi thanks Koji Sekiguchi-2 for your reply . Ya i was looking something like that . So when doing the solrrequest is should have extra config parameters facet.tree and i shud give the fields csv to specify the hierarchy will try and see if its giving me desired results . But just one doubt i am using Solr-1.2.0 Version . is this feature present in Solr-1.2.0 Version ?? thanks . Koji Sekiguchi-2 wrote: ashokcz wrote: Hi all, i have a scenario where i need to get facet count for combination of fields. Say i have two fields Manufacturer and Year of manufacture. I search for something and it gives me 15 results and my facet count as like this : Manufacturer : Nokia(5);Motorola(7);iphone(3) Year of manufacture : 2007 (4) ; 2008 (4) 2009 (7). But what i need is combination of count . Say Nokia - 2007 - 1 Nokia - 2008 - 1 Nokia - 2009 - 2 Somethig like this is there any way we can get this kind of facet counts from single solr search hits ??? Are you looking at this? https://issues.apache.org/jira/browse/SOLR-792 Koji -- View this message in context: http://www.nabble.com/Getting-Facet-Count-of-combination-of-fields-tp24511923p24512961.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Getting Facet Count of combination of fields
hmmm thanks Koji :handshake: will trymy hands on 1.4 version and see my luck =^D Koji Sekiguchi-2 wrote: ashokcz wrote: Hi thanks Koji Sekiguchi-2 for your reply . Ya i was looking something like that . So when doing the solrrequest is should have extra config parameters facet.tree and i shud give the fields csv to specify the hierarchy will try and see if its giving me desired results . But just one doubt i am using Solr-1.2.0 Version . is this feature present in Solr-1.2.0 Version ?? thanks . Unfortunately, no. I think it will be 1.4 or later. Koji -- View this message in context: http://www.nabble.com/Getting-Facet-Count-of-combination-of-fields-tp24511923p24513763.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Getting Facet Count of combination of fields
hmmm but in my case it will be dynamic . they may choose different fields at run time and accordingly i need to populate the values ... Avlesh Singh wrote: If you create a field called brand_year_of_manufacturing and populate it with the brandName - YOM data while indexing, you can achieve the desired with a simple facet on this field. Cheers Avlesh On Thu, Jul 16, 2009 at 1:19 PM, ashokcz ashokkumar.gane...@tcs.com wrote: Hi all, i have a scenario where i need to get facet count for combination of fields. Say i have two fields Manufacturer and Year of manufacture. I search for something and it gives me 15 results and my facet count as like this : Manufacturer : Nokia(5);Motorola(7);iphone(3) Year of manufacture : 2007 (4) ; 2008 (4) 2009 (7). But what i need is combination of count . Say Nokia - 2007 - 1 Nokia - 2008 - 1 Nokia - 2009 - 2 Somethig like this is there any way we can get this kind of facet counts from single solr search hits ??? -- View this message in context: http://www.nabble.com/Getting-Facet-Count-of-combination-of-fields-tp24511923p24511923.html Sent from the Solr - User mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/Getting-Facet-Count-of-combination-of-fields-tp24511923p24513837.html Sent from the Solr - User mailing list archive at Nabble.com.