Kamesh Sampath Hace 12 años This is awesome Ray!!! Thanks for the postJust couple of questions around the frameworks used did we try to use Solor or still continued with Lucene and wrote our facet search framework. Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Kamesh Sampath Hace 12 años - Editado We have abstracted our own Facet framework so that we could build it more or less on any engine. For Lucene, facet support is implemented using the Bobo engine (http://code.google.com/p/bobo-browse/) and in the case of Solr we just use it's features directly. In both cases we wrap the underlying technology with our own API. The idea being that you could plug any engine in back there and our front end APIs don't need to change. The API is very simple for facet support. Por favor identifíquese para votar. Contestar como... Cancelar
Ray Augé Kamesh Sampath Hace 12 años - Editado We have abstracted our own Facet framework so that we could build it more or less on any engine. For Lucene, facet support is implemented using the Bobo engine (http://code.google.com/p/bobo-browse/) and in the case of Solr we just use it's features directly. In both cases we wrap the underlying technology with our own API. The idea being that you could plug any engine in back there and our front end APIs don't need to change. The API is very simple for facet support. Por favor identifíquese para votar. Contestar como... Cancelar
Tejas Kanani Hace 12 años Nice Blog Ray !!!Faceted Search is cool !!And this blog covers lots of details regarding Search.Thanks for the post. Por favor identifíquese para votar. Contestar como... Cancelar
Manish Kumar Gupta Hace 12 años Your posts are always interesting and informative. Thanks for sharing this with everyone Ray!!! Por favor identifíquese para votar. Contestar como... Cancelar
Dana Oredson Hace 12 años That is a lot of information. I think I'm going to need to read it several times in order to hold it all in my head. Nice work. It looks like a lot of time and effort went into this post. Por favor identifíquese para votar. Contestar como... Cancelar
Nagendra Kumar Busam Hace 12 años Really great detailing about faceted search feature. Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Nagendra Kumar Busam Hace 12 años Thanks All. Por favor identifíquese para votar. Contestar como... Cancelar
Ray Augé Nagendra Kumar Busam Hace 12 años Thanks All. Por favor identifíquese para votar. Contestar como... Cancelar
Erin Caroll Hace 12 años - Editado Ray I always have an eagerness for reading your posts and articles because I know all your articles are informative as well as knowledgeable.. Por favor identifíquese para votar. Contestar como... Cancelar Siva Ranjani Erin Caroll Hace 12 años Hi..i m new to liferay..i want to create search portlet using lucene..can u suggest steps for me..any sample code...Thank you.. Por favor identifíquese para votar. Contestar como... Cancelar Firas BD Siva Ranjani Hace 12 años Hi Ray, I wanna thank you about this post because it's so informative, but I have just a problem: when for example I am searching for a word, and results are in more than one page when I click to go to the next page (I click "More") I got error and no results appear .. Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Firas BD Hace 12 años @Siva, the best sample code is the search portlet itself: https://github.com/liferay/liferay-portal/blob/master/portal-web/docroot/html/portlet/search/main_search.jspf@Firas, is the error with the default search portlet or with custom code? Por favor identifíquese para votar. Contestar como... Cancelar Firas BD Ray Augé Hace 12 años @Ray Augé:the error is with the default search portlet in Liferay 6.1: and this is the error syntax:12:06:15,737 ERROR [IncludeTag:154] com.liferay.portal.kernel.search.SearchException: java.lang.IllegalArgumentException: fromIndex(20) > toIndex(5) at com.liferay.portal.kernel.search.FacetedSearcher.search(FacetedSearcher.java:106) at org.apache.jsp.html.portlet.search.search_jsp._jspService(search_jsp.java:1073) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:593) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:530) at com.liferay.taglib.util.IncludeTag.include(IncludeTag.java:323) at com.liferay.taglib.util.IncludeTag._doInclude(IncludeTag.java:418) at com.liferay.taglib.util.IncludeTag.doEndTag(IncludeTag.java:92)Caused by: java.lang.IllegalArgumentException: fromIndex(20) > toIndex(5) at java.util.SubList.<init>(AbstractList.java:604) at java.util.RandomAccessSubList.<init>(AbstractList.java:758) Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Firas BD Hace 12 años Can you file a ticket for this which outlines the exact steps you used to reproduce it? I'll take a look as soon as I get a chance. Por favor identifíquese para votar. Contestar como... Cancelar Firas BD Ray Augé Hace 12 años @ Ray:http://issues.liferay.com/browse/LPS-26227 Por favor identifíquese para votar. Contestar como... Cancelar Vlad Kuzmyk Firas BD Hace 12 años Hi Ray, I'm new to Liferay and need your advise. I've created a hook to a search portlet and have a couple of questions: 1. The start page is view.jsp and conains only <liferay-ui:search />. how would I bypass it so it would go directly to main_search.jsp?2. In my Document library I have categories Monthly Reports and Quarterly Reports. I want to place two links(like facets) with category names and when user clicks it would process the search only for selected category. How would you suggest to approach this task? Or maybe i need to create a custom search portlet based on a search portlet. Is it a good way to copy all the code from custom portlet into my portlet and modify it?Thank you in advance Por favor identifíquese para votar. Contestar como... Cancelar Suyash Madhusudan Bhalekar Firas BD Hace 10 años Hi,Any progress on this. I have modified liferay's default Blog portlet via EXT to meet up my requirement.In control panel when I click on Blogs portlet and try to search for a Blog with say "test" then I can see the list of Blogs with proper pagination.For example , for 44 entries of corresponding Blogs I can see 3 pages i.e 4 links:1 2 3 NextBut when I follow same step for my customized Blog portlet then for same results I can see 5 links:1 2 3 4 NextNow when I click on 4, no display appears with backend error saying :java.lang.IllegalArgumentException: fromIndex(60) > toIndex(44)Can anybody help me to find the exact cause. Thanks Por favor identifíquese para votar. Contestar como... Cancelar Suyash Madhusudan Bhalekar Firas BD Hace 10 años Hi,Any progress on this. I have modified liferay's default Blog portlet via EXT to meet up my requirement.In control panel when I click on Blogs portlet and try to search for a Blog with say "test" then I can see the list of Blogs with proper pagination.For example , for 44 entries of corresponding Blogs I can see 3 pages i.e 4 links:1 2 3 NextBut when I follow same step for my customized Blog portlet then for same results I can see 5 links:1 2 3 4 NextNow when I click on 4, no display appears with backend error saying :java.lang.IllegalArgumentException: fromIndex(60) > toIndex(44)Can anybody help me to find the exact cause. Thanks Por favor identifíquese para votar. Contestar como... Cancelar
Siva Ranjani Erin Caroll Hace 12 años Hi..i m new to liferay..i want to create search portlet using lucene..can u suggest steps for me..any sample code...Thank you.. Por favor identifíquese para votar. Contestar como... Cancelar Firas BD Siva Ranjani Hace 12 años Hi Ray, I wanna thank you about this post because it's so informative, but I have just a problem: when for example I am searching for a word, and results are in more than one page when I click to go to the next page (I click "More") I got error and no results appear .. Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Firas BD Hace 12 años @Siva, the best sample code is the search portlet itself: https://github.com/liferay/liferay-portal/blob/master/portal-web/docroot/html/portlet/search/main_search.jspf@Firas, is the error with the default search portlet or with custom code? Por favor identifíquese para votar. Contestar como... Cancelar Firas BD Ray Augé Hace 12 años @Ray Augé:the error is with the default search portlet in Liferay 6.1: and this is the error syntax:12:06:15,737 ERROR [IncludeTag:154] com.liferay.portal.kernel.search.SearchException: java.lang.IllegalArgumentException: fromIndex(20) > toIndex(5) at com.liferay.portal.kernel.search.FacetedSearcher.search(FacetedSearcher.java:106) at org.apache.jsp.html.portlet.search.search_jsp._jspService(search_jsp.java:1073) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:593) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:530) at com.liferay.taglib.util.IncludeTag.include(IncludeTag.java:323) at com.liferay.taglib.util.IncludeTag._doInclude(IncludeTag.java:418) at com.liferay.taglib.util.IncludeTag.doEndTag(IncludeTag.java:92)Caused by: java.lang.IllegalArgumentException: fromIndex(20) > toIndex(5) at java.util.SubList.<init>(AbstractList.java:604) at java.util.RandomAccessSubList.<init>(AbstractList.java:758) Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Firas BD Hace 12 años Can you file a ticket for this which outlines the exact steps you used to reproduce it? I'll take a look as soon as I get a chance. Por favor identifíquese para votar. Contestar como... Cancelar Firas BD Ray Augé Hace 12 años @ Ray:http://issues.liferay.com/browse/LPS-26227 Por favor identifíquese para votar. Contestar como... Cancelar Vlad Kuzmyk Firas BD Hace 12 años Hi Ray, I'm new to Liferay and need your advise. I've created a hook to a search portlet and have a couple of questions: 1. The start page is view.jsp and conains only <liferay-ui:search />. how would I bypass it so it would go directly to main_search.jsp?2. In my Document library I have categories Monthly Reports and Quarterly Reports. I want to place two links(like facets) with category names and when user clicks it would process the search only for selected category. How would you suggest to approach this task? Or maybe i need to create a custom search portlet based on a search portlet. Is it a good way to copy all the code from custom portlet into my portlet and modify it?Thank you in advance Por favor identifíquese para votar. Contestar como... Cancelar Suyash Madhusudan Bhalekar Firas BD Hace 10 años Hi,Any progress on this. I have modified liferay's default Blog portlet via EXT to meet up my requirement.In control panel when I click on Blogs portlet and try to search for a Blog with say "test" then I can see the list of Blogs with proper pagination.For example , for 44 entries of corresponding Blogs I can see 3 pages i.e 4 links:1 2 3 NextBut when I follow same step for my customized Blog portlet then for same results I can see 5 links:1 2 3 4 NextNow when I click on 4, no display appears with backend error saying :java.lang.IllegalArgumentException: fromIndex(60) > toIndex(44)Can anybody help me to find the exact cause. Thanks Por favor identifíquese para votar. Contestar como... Cancelar Suyash Madhusudan Bhalekar Firas BD Hace 10 años Hi,Any progress on this. I have modified liferay's default Blog portlet via EXT to meet up my requirement.In control panel when I click on Blogs portlet and try to search for a Blog with say "test" then I can see the list of Blogs with proper pagination.For example , for 44 entries of corresponding Blogs I can see 3 pages i.e 4 links:1 2 3 NextBut when I follow same step for my customized Blog portlet then for same results I can see 5 links:1 2 3 4 NextNow when I click on 4, no display appears with backend error saying :java.lang.IllegalArgumentException: fromIndex(60) > toIndex(44)Can anybody help me to find the exact cause. Thanks Por favor identifíquese para votar. Contestar como... Cancelar
Firas BD Siva Ranjani Hace 12 años Hi Ray, I wanna thank you about this post because it's so informative, but I have just a problem: when for example I am searching for a word, and results are in more than one page when I click to go to the next page (I click "More") I got error and no results appear .. Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Firas BD Hace 12 años @Siva, the best sample code is the search portlet itself: https://github.com/liferay/liferay-portal/blob/master/portal-web/docroot/html/portlet/search/main_search.jspf@Firas, is the error with the default search portlet or with custom code? Por favor identifíquese para votar. Contestar como... Cancelar Firas BD Ray Augé Hace 12 años @Ray Augé:the error is with the default search portlet in Liferay 6.1: and this is the error syntax:12:06:15,737 ERROR [IncludeTag:154] com.liferay.portal.kernel.search.SearchException: java.lang.IllegalArgumentException: fromIndex(20) > toIndex(5) at com.liferay.portal.kernel.search.FacetedSearcher.search(FacetedSearcher.java:106) at org.apache.jsp.html.portlet.search.search_jsp._jspService(search_jsp.java:1073) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:593) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:530) at com.liferay.taglib.util.IncludeTag.include(IncludeTag.java:323) at com.liferay.taglib.util.IncludeTag._doInclude(IncludeTag.java:418) at com.liferay.taglib.util.IncludeTag.doEndTag(IncludeTag.java:92)Caused by: java.lang.IllegalArgumentException: fromIndex(20) > toIndex(5) at java.util.SubList.<init>(AbstractList.java:604) at java.util.RandomAccessSubList.<init>(AbstractList.java:758) Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Firas BD Hace 12 años Can you file a ticket for this which outlines the exact steps you used to reproduce it? I'll take a look as soon as I get a chance. Por favor identifíquese para votar. Contestar como... Cancelar Firas BD Ray Augé Hace 12 años @ Ray:http://issues.liferay.com/browse/LPS-26227 Por favor identifíquese para votar. Contestar como... Cancelar Vlad Kuzmyk Firas BD Hace 12 años Hi Ray, I'm new to Liferay and need your advise. I've created a hook to a search portlet and have a couple of questions: 1. The start page is view.jsp and conains only <liferay-ui:search />. how would I bypass it so it would go directly to main_search.jsp?2. In my Document library I have categories Monthly Reports and Quarterly Reports. I want to place two links(like facets) with category names and when user clicks it would process the search only for selected category. How would you suggest to approach this task? Or maybe i need to create a custom search portlet based on a search portlet. Is it a good way to copy all the code from custom portlet into my portlet and modify it?Thank you in advance Por favor identifíquese para votar. Contestar como... Cancelar Suyash Madhusudan Bhalekar Firas BD Hace 10 años Hi,Any progress on this. I have modified liferay's default Blog portlet via EXT to meet up my requirement.In control panel when I click on Blogs portlet and try to search for a Blog with say "test" then I can see the list of Blogs with proper pagination.For example , for 44 entries of corresponding Blogs I can see 3 pages i.e 4 links:1 2 3 NextBut when I follow same step for my customized Blog portlet then for same results I can see 5 links:1 2 3 4 NextNow when I click on 4, no display appears with backend error saying :java.lang.IllegalArgumentException: fromIndex(60) > toIndex(44)Can anybody help me to find the exact cause. Thanks Por favor identifíquese para votar. Contestar como... Cancelar Suyash Madhusudan Bhalekar Firas BD Hace 10 años Hi,Any progress on this. I have modified liferay's default Blog portlet via EXT to meet up my requirement.In control panel when I click on Blogs portlet and try to search for a Blog with say "test" then I can see the list of Blogs with proper pagination.For example , for 44 entries of corresponding Blogs I can see 3 pages i.e 4 links:1 2 3 NextBut when I follow same step for my customized Blog portlet then for same results I can see 5 links:1 2 3 4 NextNow when I click on 4, no display appears with backend error saying :java.lang.IllegalArgumentException: fromIndex(60) > toIndex(44)Can anybody help me to find the exact cause. Thanks Por favor identifíquese para votar. Contestar como... Cancelar
Ray Augé Firas BD Hace 12 años @Siva, the best sample code is the search portlet itself: https://github.com/liferay/liferay-portal/blob/master/portal-web/docroot/html/portlet/search/main_search.jspf@Firas, is the error with the default search portlet or with custom code? Por favor identifíquese para votar. Contestar como... Cancelar Firas BD Ray Augé Hace 12 años @Ray Augé:the error is with the default search portlet in Liferay 6.1: and this is the error syntax:12:06:15,737 ERROR [IncludeTag:154] com.liferay.portal.kernel.search.SearchException: java.lang.IllegalArgumentException: fromIndex(20) > toIndex(5) at com.liferay.portal.kernel.search.FacetedSearcher.search(FacetedSearcher.java:106) at org.apache.jsp.html.portlet.search.search_jsp._jspService(search_jsp.java:1073) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:593) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:530) at com.liferay.taglib.util.IncludeTag.include(IncludeTag.java:323) at com.liferay.taglib.util.IncludeTag._doInclude(IncludeTag.java:418) at com.liferay.taglib.util.IncludeTag.doEndTag(IncludeTag.java:92)Caused by: java.lang.IllegalArgumentException: fromIndex(20) > toIndex(5) at java.util.SubList.<init>(AbstractList.java:604) at java.util.RandomAccessSubList.<init>(AbstractList.java:758) Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Firas BD Hace 12 años Can you file a ticket for this which outlines the exact steps you used to reproduce it? I'll take a look as soon as I get a chance. Por favor identifíquese para votar. Contestar como... Cancelar Firas BD Ray Augé Hace 12 años @ Ray:http://issues.liferay.com/browse/LPS-26227 Por favor identifíquese para votar. Contestar como... Cancelar Vlad Kuzmyk Firas BD Hace 12 años Hi Ray, I'm new to Liferay and need your advise. I've created a hook to a search portlet and have a couple of questions: 1. The start page is view.jsp and conains only <liferay-ui:search />. how would I bypass it so it would go directly to main_search.jsp?2. In my Document library I have categories Monthly Reports and Quarterly Reports. I want to place two links(like facets) with category names and when user clicks it would process the search only for selected category. How would you suggest to approach this task? Or maybe i need to create a custom search portlet based on a search portlet. Is it a good way to copy all the code from custom portlet into my portlet and modify it?Thank you in advance Por favor identifíquese para votar. Contestar como... Cancelar Suyash Madhusudan Bhalekar Firas BD Hace 10 años Hi,Any progress on this. I have modified liferay's default Blog portlet via EXT to meet up my requirement.In control panel when I click on Blogs portlet and try to search for a Blog with say "test" then I can see the list of Blogs with proper pagination.For example , for 44 entries of corresponding Blogs I can see 3 pages i.e 4 links:1 2 3 NextBut when I follow same step for my customized Blog portlet then for same results I can see 5 links:1 2 3 4 NextNow when I click on 4, no display appears with backend error saying :java.lang.IllegalArgumentException: fromIndex(60) > toIndex(44)Can anybody help me to find the exact cause. Thanks Por favor identifíquese para votar. Contestar como... Cancelar Suyash Madhusudan Bhalekar Firas BD Hace 10 años Hi,Any progress on this. I have modified liferay's default Blog portlet via EXT to meet up my requirement.In control panel when I click on Blogs portlet and try to search for a Blog with say "test" then I can see the list of Blogs with proper pagination.For example , for 44 entries of corresponding Blogs I can see 3 pages i.e 4 links:1 2 3 NextBut when I follow same step for my customized Blog portlet then for same results I can see 5 links:1 2 3 4 NextNow when I click on 4, no display appears with backend error saying :java.lang.IllegalArgumentException: fromIndex(60) > toIndex(44)Can anybody help me to find the exact cause. Thanks Por favor identifíquese para votar. Contestar como... Cancelar
Firas BD Ray Augé Hace 12 años @Ray Augé:the error is with the default search portlet in Liferay 6.1: and this is the error syntax:12:06:15,737 ERROR [IncludeTag:154] com.liferay.portal.kernel.search.SearchException: java.lang.IllegalArgumentException: fromIndex(20) > toIndex(5) at com.liferay.portal.kernel.search.FacetedSearcher.search(FacetedSearcher.java:106) at org.apache.jsp.html.portlet.search.search_jsp._jspService(search_jsp.java:1073) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:593) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:530) at com.liferay.taglib.util.IncludeTag.include(IncludeTag.java:323) at com.liferay.taglib.util.IncludeTag._doInclude(IncludeTag.java:418) at com.liferay.taglib.util.IncludeTag.doEndTag(IncludeTag.java:92)Caused by: java.lang.IllegalArgumentException: fromIndex(20) > toIndex(5) at java.util.SubList.<init>(AbstractList.java:604) at java.util.RandomAccessSubList.<init>(AbstractList.java:758) Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Firas BD Hace 12 años Can you file a ticket for this which outlines the exact steps you used to reproduce it? I'll take a look as soon as I get a chance. Por favor identifíquese para votar. Contestar como... Cancelar Firas BD Ray Augé Hace 12 años @ Ray:http://issues.liferay.com/browse/LPS-26227 Por favor identifíquese para votar. Contestar como... Cancelar Vlad Kuzmyk Firas BD Hace 12 años Hi Ray, I'm new to Liferay and need your advise. I've created a hook to a search portlet and have a couple of questions: 1. The start page is view.jsp and conains only <liferay-ui:search />. how would I bypass it so it would go directly to main_search.jsp?2. In my Document library I have categories Monthly Reports and Quarterly Reports. I want to place two links(like facets) with category names and when user clicks it would process the search only for selected category. How would you suggest to approach this task? Or maybe i need to create a custom search portlet based on a search portlet. Is it a good way to copy all the code from custom portlet into my portlet and modify it?Thank you in advance Por favor identifíquese para votar. Contestar como... Cancelar Suyash Madhusudan Bhalekar Firas BD Hace 10 años Hi,Any progress on this. I have modified liferay's default Blog portlet via EXT to meet up my requirement.In control panel when I click on Blogs portlet and try to search for a Blog with say "test" then I can see the list of Blogs with proper pagination.For example , for 44 entries of corresponding Blogs I can see 3 pages i.e 4 links:1 2 3 NextBut when I follow same step for my customized Blog portlet then for same results I can see 5 links:1 2 3 4 NextNow when I click on 4, no display appears with backend error saying :java.lang.IllegalArgumentException: fromIndex(60) > toIndex(44)Can anybody help me to find the exact cause. Thanks Por favor identifíquese para votar. Contestar como... Cancelar Suyash Madhusudan Bhalekar Firas BD Hace 10 años Hi,Any progress on this. I have modified liferay's default Blog portlet via EXT to meet up my requirement.In control panel when I click on Blogs portlet and try to search for a Blog with say "test" then I can see the list of Blogs with proper pagination.For example , for 44 entries of corresponding Blogs I can see 3 pages i.e 4 links:1 2 3 NextBut when I follow same step for my customized Blog portlet then for same results I can see 5 links:1 2 3 4 NextNow when I click on 4, no display appears with backend error saying :java.lang.IllegalArgumentException: fromIndex(60) > toIndex(44)Can anybody help me to find the exact cause. Thanks Por favor identifíquese para votar. Contestar como... Cancelar
Ray Augé Firas BD Hace 12 años Can you file a ticket for this which outlines the exact steps you used to reproduce it? I'll take a look as soon as I get a chance. Por favor identifíquese para votar. Contestar como... Cancelar Firas BD Ray Augé Hace 12 años @ Ray:http://issues.liferay.com/browse/LPS-26227 Por favor identifíquese para votar. Contestar como... Cancelar Vlad Kuzmyk Firas BD Hace 12 años Hi Ray, I'm new to Liferay and need your advise. I've created a hook to a search portlet and have a couple of questions: 1. The start page is view.jsp and conains only <liferay-ui:search />. how would I bypass it so it would go directly to main_search.jsp?2. In my Document library I have categories Monthly Reports and Quarterly Reports. I want to place two links(like facets) with category names and when user clicks it would process the search only for selected category. How would you suggest to approach this task? Or maybe i need to create a custom search portlet based on a search portlet. Is it a good way to copy all the code from custom portlet into my portlet and modify it?Thank you in advance Por favor identifíquese para votar. Contestar como... Cancelar
Firas BD Ray Augé Hace 12 años @ Ray:http://issues.liferay.com/browse/LPS-26227 Por favor identifíquese para votar. Contestar como... Cancelar Vlad Kuzmyk Firas BD Hace 12 años Hi Ray, I'm new to Liferay and need your advise. I've created a hook to a search portlet and have a couple of questions: 1. The start page is view.jsp and conains only <liferay-ui:search />. how would I bypass it so it would go directly to main_search.jsp?2. In my Document library I have categories Monthly Reports and Quarterly Reports. I want to place two links(like facets) with category names and when user clicks it would process the search only for selected category. How would you suggest to approach this task? Or maybe i need to create a custom search portlet based on a search portlet. Is it a good way to copy all the code from custom portlet into my portlet and modify it?Thank you in advance Por favor identifíquese para votar. Contestar como... Cancelar
Vlad Kuzmyk Firas BD Hace 12 años Hi Ray, I'm new to Liferay and need your advise. I've created a hook to a search portlet and have a couple of questions: 1. The start page is view.jsp and conains only <liferay-ui:search />. how would I bypass it so it would go directly to main_search.jsp?2. In my Document library I have categories Monthly Reports and Quarterly Reports. I want to place two links(like facets) with category names and when user clicks it would process the search only for selected category. How would you suggest to approach this task? Or maybe i need to create a custom search portlet based on a search portlet. Is it a good way to copy all the code from custom portlet into my portlet and modify it?Thank you in advance Por favor identifíquese para votar. Contestar como... Cancelar
Suyash Madhusudan Bhalekar Firas BD Hace 10 años Hi,Any progress on this. I have modified liferay's default Blog portlet via EXT to meet up my requirement.In control panel when I click on Blogs portlet and try to search for a Blog with say "test" then I can see the list of Blogs with proper pagination.For example , for 44 entries of corresponding Blogs I can see 3 pages i.e 4 links:1 2 3 NextBut when I follow same step for my customized Blog portlet then for same results I can see 5 links:1 2 3 4 NextNow when I click on 4, no display appears with backend error saying :java.lang.IllegalArgumentException: fromIndex(60) > toIndex(44)Can anybody help me to find the exact cause. Thanks Por favor identifíquese para votar. Contestar como... Cancelar
Suyash Madhusudan Bhalekar Firas BD Hace 10 años Hi,Any progress on this. I have modified liferay's default Blog portlet via EXT to meet up my requirement.In control panel when I click on Blogs portlet and try to search for a Blog with say "test" then I can see the list of Blogs with proper pagination.For example , for 44 entries of corresponding Blogs I can see 3 pages i.e 4 links:1 2 3 NextBut when I follow same step for my customized Blog portlet then for same results I can see 5 links:1 2 3 4 NextNow when I click on 4, no display appears with backend error saying :java.lang.IllegalArgumentException: fromIndex(60) > toIndex(44)Can anybody help me to find the exact cause. Thanks Por favor identifíquese para votar. Contestar como... Cancelar
Joseph Toman Hace 12 años Nice post, and timely too. I was just about to implement search in a project I'm working on. A couple of questions: you said that proximity search and term boosting aren't supported. Is that just in the search portlet, or in the underlying API as well?Also, in the development part of the article your code refers to something called mainSearchContainer . What is it, and where'd you get it from? Thanks. Por favor identifíquese para votar. Contestar como... Cancelar Joseph Toman Joseph Toman Hace 12 años Never mind about that second question, found it in main_search.jspf . Por favor identifíquese para votar. Contestar como... Cancelar
Joseph Toman Joseph Toman Hace 12 años Never mind about that second question, found it in main_search.jspf . Por favor identifíquese para votar. Contestar como... Cancelar
Jonathan Lloyd Hace 12 años Hi Ray,Thanks for the article. I'm trying to get a faceted search to work using an "AND" condition for the assetCategoryIds field, however it never returns any results. I enabled debug output on both the SearchEngineUtils and LuceneIndexSearcherImpl classes and the query string output is "+(+(companyId:10154) +(assetCategoryIds11703 AND 11804)) +createDate:[19700101000000 TO 20121231235959] +((+(entryClassName:com.liferay.portlet.journal.model.JournalArticle) +(status:0))))".To test the lucene syntax, I also used the code below to produce a Query object and it works fine. Do you have any ideas on what might be happening? Thanks in advance for the help.Query query = StringQueryFactoryUtil.create("+(+(companyId:10154) +(assetCategoryIds11703 AND 11804)) +createDate:[19700101000000 TO 20121231235959] +((+(entryClassName:com.liferay.portlet.journal.model.JournalArticle) +(status:0))))"); Hits hits = SearchEngineUtil.search(searchContext.getCompanyId(), query, QueryUtil.ALL_POS, QueryUtil.ALL_POS); Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Jonathan Lloyd Hace 12 años Try+(+assetCategoryIds:11703 +assetCategoryIds:11804)it's easier on the parser and means the same thing. Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Ray Augé Hace 12 años AND should be used more specifically like so:assetCategoryIds:11703 AND assetCategoryIds:11804 Por favor identifíquese para votar. Contestar como... Cancelar Jonathan Lloyd Ray Augé Hace 12 años Hi Ray,Thanks for the quick reply! I have used "+" instead of "AND", but still get the same result.I'm not very familiar with lucene, but it seems like the problem is that based on the way I am setting the attribute values in the SearchContext object and have the facet defined, the objects that build the query string will only output the "assetCategoryIds" text just once. For example, the query string would look like +(assetCategoryIds:+11703 +11804) instead of +(+assetCategoryIds:11703 +assetCategoryIds:11804).As noted above, I'm using the SearchContext object to set the attributes of the assetCategoryIds field, but I don't see a way to include multiple arguments into that one field with out concatenating them together myself. Something like the code below. I've also tried setting the andSearch property on the SearchContext with no success.searchContext.setAttribute("assetCategoryIds", convertCategoryIdsToAndString(categoryIds)); Por favor identifíquese para votar. Contestar como... Cancelar
Ray Augé Jonathan Lloyd Hace 12 años Try+(+assetCategoryIds:11703 +assetCategoryIds:11804)it's easier on the parser and means the same thing. Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Ray Augé Hace 12 años AND should be used more specifically like so:assetCategoryIds:11703 AND assetCategoryIds:11804 Por favor identifíquese para votar. Contestar como... Cancelar Jonathan Lloyd Ray Augé Hace 12 años Hi Ray,Thanks for the quick reply! I have used "+" instead of "AND", but still get the same result.I'm not very familiar with lucene, but it seems like the problem is that based on the way I am setting the attribute values in the SearchContext object and have the facet defined, the objects that build the query string will only output the "assetCategoryIds" text just once. For example, the query string would look like +(assetCategoryIds:+11703 +11804) instead of +(+assetCategoryIds:11703 +assetCategoryIds:11804).As noted above, I'm using the SearchContext object to set the attributes of the assetCategoryIds field, but I don't see a way to include multiple arguments into that one field with out concatenating them together myself. Something like the code below. I've also tried setting the andSearch property on the SearchContext with no success.searchContext.setAttribute("assetCategoryIds", convertCategoryIdsToAndString(categoryIds)); Por favor identifíquese para votar. Contestar como... Cancelar
Ray Augé Ray Augé Hace 12 años AND should be used more specifically like so:assetCategoryIds:11703 AND assetCategoryIds:11804 Por favor identifíquese para votar. Contestar como... Cancelar Jonathan Lloyd Ray Augé Hace 12 años Hi Ray,Thanks for the quick reply! I have used "+" instead of "AND", but still get the same result.I'm not very familiar with lucene, but it seems like the problem is that based on the way I am setting the attribute values in the SearchContext object and have the facet defined, the objects that build the query string will only output the "assetCategoryIds" text just once. For example, the query string would look like +(assetCategoryIds:+11703 +11804) instead of +(+assetCategoryIds:11703 +assetCategoryIds:11804).As noted above, I'm using the SearchContext object to set the attributes of the assetCategoryIds field, but I don't see a way to include multiple arguments into that one field with out concatenating them together myself. Something like the code below. I've also tried setting the andSearch property on the SearchContext with no success.searchContext.setAttribute("assetCategoryIds", convertCategoryIdsToAndString(categoryIds)); Por favor identifíquese para votar. Contestar como... Cancelar
Jonathan Lloyd Ray Augé Hace 12 años Hi Ray,Thanks for the quick reply! I have used "+" instead of "AND", but still get the same result.I'm not very familiar with lucene, but it seems like the problem is that based on the way I am setting the attribute values in the SearchContext object and have the facet defined, the objects that build the query string will only output the "assetCategoryIds" text just once. For example, the query string would look like +(assetCategoryIds:+11703 +11804) instead of +(+assetCategoryIds:11703 +assetCategoryIds:11804).As noted above, I'm using the SearchContext object to set the attributes of the assetCategoryIds field, but I don't see a way to include multiple arguments into that one field with out concatenating them together myself. Something like the code below. I've also tried setting the andSearch property on the SearchContext with no success.searchContext.setAttribute("assetCategoryIds", convertCategoryIdsToAndString(categoryIds)); Por favor identifíquese para votar. Contestar como... Cancelar
Dave Weitzel Hace 11 años Ray, just found this post after looking into Search results and facets in more detail for our customization work.I have one question though? can we get the facet tags and categories localized?(displayed in the facets/asset_tags.jsp as well as under relevant search item).When you have multi-lingual site it looks odd if the categories are in the base locale for the site. The categories are translated when displayed within the relevant portlet (eg document library).I understand these are now facets in a search engine result list but the user isnt going to understand that, Por favor identifíquese para votar. Contestar como... Cancelar
Salvador Baena Hace 11 años Hi Ray,I have a problem with create pre-configured to search only returns That tag "noticia"The search returns all the content I type "com.liferay.portlet.journal.model.JournalArticle"My code is this:{facets: [{className: 'com.liferay.portal.kernel.search.facet.AssetEntriesFacet', data: {frequencyThreshold: 1, values: ['com.liferay.portlet.journal.model.JournalArticle']}, displayStyle: 'asset_entries', fieldName: 'entryClassName', label: 'asset-type', order: 'OrderHitsDesc', static: false, weight: 1.5},{className: 'com.liferay.portal.kernel.search.facet.MultiValueFacet', data: {frequencyThreshold: 1, values: ['noticia']}, displayStyle: 'asset_entries', fieldName: 'assetTagNames', label: 'tag', order: 'OrderHitsDesc', static: false, weight: 1.5}, {className: 'com.liferay.portal.kernel.search.facet.MultiValueFacet', data: {displayStyle: 'list', frequencyThreshold: 1, maxTerms: 10, showAssetCount: true}, displayStyle: 'asset_tags', fieldName: 'assetTagNames', label: 'tag', order: 'OrderHitsDesc', static: false, weight: 1.4},{className: 'com.liferay.portal.kernel.search.facet.MultiValueFacet', data: {displayStyle: 'list', frequencyThreshold: 1, maxTerms: 10, showAssetCount: true}, displayStyle: 'asset_tags', fieldName: 'assetCategoryNames', label: 'category', order: 'OrderHitsDesc', static: false, weight: 1.3},{className: 'com.liferay.portal.kernel.search.facet.RangeFacet', data: {frequencyThreshold: 1, ranges: [{label:'modified', range:'[19700101000000 TO *]'}]}, displayStyle: 'modified', fieldName: 'modified', label: 'modified', order: 'OrderHitsDesc', static: false, weight: 1.1}]}Thank you very much.Best regards. Por favor identifíquese para votar. Contestar como... Cancelar Amit Doshi Salvador Baena Hace 11 años It is possible that Liferay can index content of PDF documents so it can show up in the search ? Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Amit Doshi Hace 11 años @Salvador, make your "noticia" facet static since you are forcing passing a single value.@Amit, Liferay does it's best attempt to index PDFs automatically (it can't get content from a PDF filled only with scanned images for instance). Por favor identifíquese para votar. Contestar como... Cancelar Florencia Hernández Ray Augé Hace 11 años Wow, incredible article! I would like to know what is the best way to let the user filter by asset type before hand, before perfoming the search. For example, the user could enter the word "water", and then, from a checkboxes list, choose the asset type to look into, for example, Blog entries. And that would search the word water in blog entries only. Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Florencia Hernández Hace 11 años It's true that the search portlet doesn't start in the mode having performed a default search (a search with no keywords). If it did, then you would see all the facets available, and then you would see and could select the asset type you want to search within and then add keywords. I think that addresses the scenario you are asking about. Perhaps it would be possible to add that behavior is a configuration option of the portlet. It wouldn't be hard. Can you make a feature request in JIRA (http://issues.liferay.com)? Por favor identifíquese para votar. Contestar como... Cancelar Florencia Hernández Ray Augé Hace 11 años Thanks Ray for the prompt reply. I just added a request: http://issues.liferay.com/browse/LPS-27514 Por favor identifíquese para votar. Contestar como... Cancelar Salvador Baena Florencia Hernández Hace 11 años Thank you very much Ray. Solved.Facet to filter by tag:{facets: [{className: 'com.liferay.portal.kernel.search.facet.AssetEntriesFacet',data: {frequencyThreshold: 1,values: ['com.liferay.portlet.journal.model.JournalArticle']},displayStyle: 'asset_entries',fieldName: 'entryClassName',label: 'asset-type',order: 'OrderHitsDesc',static: false,weight: 1.5},{className: 'com.liferay.portal.kernel.search.facet.MultiValueFacet',data: {frequencyThreshold: 1,values: ['noticia']},displayStyle: 'asset_entries',fieldName: 'assetTagNames',label: 'tag',order: 'OrderHitsDesc',static: true,weight: 1.5}]}Best regards Por favor identifíquese para votar. Contestar como... Cancelar
Amit Doshi Salvador Baena Hace 11 años It is possible that Liferay can index content of PDF documents so it can show up in the search ? Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Amit Doshi Hace 11 años @Salvador, make your "noticia" facet static since you are forcing passing a single value.@Amit, Liferay does it's best attempt to index PDFs automatically (it can't get content from a PDF filled only with scanned images for instance). Por favor identifíquese para votar. Contestar como... Cancelar Florencia Hernández Ray Augé Hace 11 años Wow, incredible article! I would like to know what is the best way to let the user filter by asset type before hand, before perfoming the search. For example, the user could enter the word "water", and then, from a checkboxes list, choose the asset type to look into, for example, Blog entries. And that would search the word water in blog entries only. Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Florencia Hernández Hace 11 años It's true that the search portlet doesn't start in the mode having performed a default search (a search with no keywords). If it did, then you would see all the facets available, and then you would see and could select the asset type you want to search within and then add keywords. I think that addresses the scenario you are asking about. Perhaps it would be possible to add that behavior is a configuration option of the portlet. It wouldn't be hard. Can you make a feature request in JIRA (http://issues.liferay.com)? Por favor identifíquese para votar. Contestar como... Cancelar Florencia Hernández Ray Augé Hace 11 años Thanks Ray for the prompt reply. I just added a request: http://issues.liferay.com/browse/LPS-27514 Por favor identifíquese para votar. Contestar como... Cancelar Salvador Baena Florencia Hernández Hace 11 años Thank you very much Ray. Solved.Facet to filter by tag:{facets: [{className: 'com.liferay.portal.kernel.search.facet.AssetEntriesFacet',data: {frequencyThreshold: 1,values: ['com.liferay.portlet.journal.model.JournalArticle']},displayStyle: 'asset_entries',fieldName: 'entryClassName',label: 'asset-type',order: 'OrderHitsDesc',static: false,weight: 1.5},{className: 'com.liferay.portal.kernel.search.facet.MultiValueFacet',data: {frequencyThreshold: 1,values: ['noticia']},displayStyle: 'asset_entries',fieldName: 'assetTagNames',label: 'tag',order: 'OrderHitsDesc',static: true,weight: 1.5}]}Best regards Por favor identifíquese para votar. Contestar como... Cancelar
Ray Augé Amit Doshi Hace 11 años @Salvador, make your "noticia" facet static since you are forcing passing a single value.@Amit, Liferay does it's best attempt to index PDFs automatically (it can't get content from a PDF filled only with scanned images for instance). Por favor identifíquese para votar. Contestar como... Cancelar Florencia Hernández Ray Augé Hace 11 años Wow, incredible article! I would like to know what is the best way to let the user filter by asset type before hand, before perfoming the search. For example, the user could enter the word "water", and then, from a checkboxes list, choose the asset type to look into, for example, Blog entries. And that would search the word water in blog entries only. Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Florencia Hernández Hace 11 años It's true that the search portlet doesn't start in the mode having performed a default search (a search with no keywords). If it did, then you would see all the facets available, and then you would see and could select the asset type you want to search within and then add keywords. I think that addresses the scenario you are asking about. Perhaps it would be possible to add that behavior is a configuration option of the portlet. It wouldn't be hard. Can you make a feature request in JIRA (http://issues.liferay.com)? Por favor identifíquese para votar. Contestar como... Cancelar Florencia Hernández Ray Augé Hace 11 años Thanks Ray for the prompt reply. I just added a request: http://issues.liferay.com/browse/LPS-27514 Por favor identifíquese para votar. Contestar como... Cancelar Salvador Baena Florencia Hernández Hace 11 años Thank you very much Ray. Solved.Facet to filter by tag:{facets: [{className: 'com.liferay.portal.kernel.search.facet.AssetEntriesFacet',data: {frequencyThreshold: 1,values: ['com.liferay.portlet.journal.model.JournalArticle']},displayStyle: 'asset_entries',fieldName: 'entryClassName',label: 'asset-type',order: 'OrderHitsDesc',static: false,weight: 1.5},{className: 'com.liferay.portal.kernel.search.facet.MultiValueFacet',data: {frequencyThreshold: 1,values: ['noticia']},displayStyle: 'asset_entries',fieldName: 'assetTagNames',label: 'tag',order: 'OrderHitsDesc',static: true,weight: 1.5}]}Best regards Por favor identifíquese para votar. Contestar como... Cancelar
Florencia Hernández Ray Augé Hace 11 años Wow, incredible article! I would like to know what is the best way to let the user filter by asset type before hand, before perfoming the search. For example, the user could enter the word "water", and then, from a checkboxes list, choose the asset type to look into, for example, Blog entries. And that would search the word water in blog entries only. Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Florencia Hernández Hace 11 años It's true that the search portlet doesn't start in the mode having performed a default search (a search with no keywords). If it did, then you would see all the facets available, and then you would see and could select the asset type you want to search within and then add keywords. I think that addresses the scenario you are asking about. Perhaps it would be possible to add that behavior is a configuration option of the portlet. It wouldn't be hard. Can you make a feature request in JIRA (http://issues.liferay.com)? Por favor identifíquese para votar. Contestar como... Cancelar Florencia Hernández Ray Augé Hace 11 años Thanks Ray for the prompt reply. I just added a request: http://issues.liferay.com/browse/LPS-27514 Por favor identifíquese para votar. Contestar como... Cancelar Salvador Baena Florencia Hernández Hace 11 años Thank you very much Ray. Solved.Facet to filter by tag:{facets: [{className: 'com.liferay.portal.kernel.search.facet.AssetEntriesFacet',data: {frequencyThreshold: 1,values: ['com.liferay.portlet.journal.model.JournalArticle']},displayStyle: 'asset_entries',fieldName: 'entryClassName',label: 'asset-type',order: 'OrderHitsDesc',static: false,weight: 1.5},{className: 'com.liferay.portal.kernel.search.facet.MultiValueFacet',data: {frequencyThreshold: 1,values: ['noticia']},displayStyle: 'asset_entries',fieldName: 'assetTagNames',label: 'tag',order: 'OrderHitsDesc',static: true,weight: 1.5}]}Best regards Por favor identifíquese para votar. Contestar como... Cancelar
Ray Augé Florencia Hernández Hace 11 años It's true that the search portlet doesn't start in the mode having performed a default search (a search with no keywords). If it did, then you would see all the facets available, and then you would see and could select the asset type you want to search within and then add keywords. I think that addresses the scenario you are asking about. Perhaps it would be possible to add that behavior is a configuration option of the portlet. It wouldn't be hard. Can you make a feature request in JIRA (http://issues.liferay.com)? Por favor identifíquese para votar. Contestar como... Cancelar Florencia Hernández Ray Augé Hace 11 años Thanks Ray for the prompt reply. I just added a request: http://issues.liferay.com/browse/LPS-27514 Por favor identifíquese para votar. Contestar como... Cancelar Salvador Baena Florencia Hernández Hace 11 años Thank you very much Ray. Solved.Facet to filter by tag:{facets: [{className: 'com.liferay.portal.kernel.search.facet.AssetEntriesFacet',data: {frequencyThreshold: 1,values: ['com.liferay.portlet.journal.model.JournalArticle']},displayStyle: 'asset_entries',fieldName: 'entryClassName',label: 'asset-type',order: 'OrderHitsDesc',static: false,weight: 1.5},{className: 'com.liferay.portal.kernel.search.facet.MultiValueFacet',data: {frequencyThreshold: 1,values: ['noticia']},displayStyle: 'asset_entries',fieldName: 'assetTagNames',label: 'tag',order: 'OrderHitsDesc',static: true,weight: 1.5}]}Best regards Por favor identifíquese para votar. Contestar como... Cancelar
Florencia Hernández Ray Augé Hace 11 años Thanks Ray for the prompt reply. I just added a request: http://issues.liferay.com/browse/LPS-27514 Por favor identifíquese para votar. Contestar como... Cancelar Salvador Baena Florencia Hernández Hace 11 años Thank you very much Ray. Solved.Facet to filter by tag:{facets: [{className: 'com.liferay.portal.kernel.search.facet.AssetEntriesFacet',data: {frequencyThreshold: 1,values: ['com.liferay.portlet.journal.model.JournalArticle']},displayStyle: 'asset_entries',fieldName: 'entryClassName',label: 'asset-type',order: 'OrderHitsDesc',static: false,weight: 1.5},{className: 'com.liferay.portal.kernel.search.facet.MultiValueFacet',data: {frequencyThreshold: 1,values: ['noticia']},displayStyle: 'asset_entries',fieldName: 'assetTagNames',label: 'tag',order: 'OrderHitsDesc',static: true,weight: 1.5}]}Best regards Por favor identifíquese para votar. Contestar como... Cancelar
Salvador Baena Florencia Hernández Hace 11 años Thank you very much Ray. Solved.Facet to filter by tag:{facets: [{className: 'com.liferay.portal.kernel.search.facet.AssetEntriesFacet',data: {frequencyThreshold: 1,values: ['com.liferay.portlet.journal.model.JournalArticle']},displayStyle: 'asset_entries',fieldName: 'entryClassName',label: 'asset-type',order: 'OrderHitsDesc',static: false,weight: 1.5},{className: 'com.liferay.portal.kernel.search.facet.MultiValueFacet',data: {frequencyThreshold: 1,values: ['noticia']},displayStyle: 'asset_entries',fieldName: 'assetTagNames',label: 'tag',order: 'OrderHitsDesc',static: true,weight: 1.5}]}Best regards Por favor identifíquese para votar. Contestar como... Cancelar
ASI Register Hace 11 años Hi,I would like to know how drill down can be allowed... Even I select a tag in result view, each tag is replaced when I choose another one.Thanks for your answer Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé ASI Register Hace 11 años Yeah, this was deferred to a later version. Technically the backend code can handle any number of arguments per facet, but in order to get a first cut, simple to use UI we opted to limit it to only a single argument per facet. BUT, since it's only a limitation from the UI, you can easily create custom facet view template (jsp hook) that overrides the default and allows multiple selection per facet.Can you open a feature request so we can track this for future versions? Por favor identifíquese para votar. Contestar como... Cancelar Matteo S Ray Augé Hace 11 años Hi Ray,I would like to know what is the best way to add a custom facet implementation.I am trying to implement drilled-down search, and I need to produce an AND query for MultiValueFacet. Looking at source, I believe that this can't be done, because termQuery has booleanClause hardcoded (added request http://issues.liferay.com/browse/LPS-28228).Thanks in advance Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Matteo S Hace 11 años Facets are for single fields only (both Bobo [our lucene facet impl] and Solr only have APIs for collecting facet on single fields at a time). But if you need to refine the underlying query so that it reflects some custom logic, then you can do that by passing an array of BooleanClauses to the searchContext before calling search in the FacetedSearcher.SearchContext searchContext = .. // setup the contextIndexer indexer = FacetedSearcher.getInstance();searchContext.setBooleanClauses(BooleanClause[] booleanClauses)Hits hits = indexer.search(searchContext);Note: An AND is simply a MUST "Occur" clause around a number of other Query instances (or Clauses). Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Ray Augé Hace 11 años BTW, the "Multi" in the name MultiValueFacet is not to reflect how it is used with respect to the number of fields to collect data from, but rather to indicate the "type" of field it can be used with. In this case fields with "multiple" values.In indexing engines, fields generally fall into one of two broad classes: - single value fields (like a number, fixed string token)- multi-value fields (like text, or arrays of values)There are certain types of operations that can take place on each of those two classes of fields. For instance, you can't do a Range query on a multi-value field. you generally can't sort a result set on a multi-value field, single value fields must generally be exact matches (setting aside regex matching obviously), etc. Por favor identifíquese para votar. Contestar como... Cancelar Himanshu Modi Ray Augé Hace 11 años Hi Ray,I have the requirements to pass multiple categories names while searching. But Faceted searcher is not giving the results for multiple categories.For example while I pass assetCategoryNames field value as comm separated (say topic2,COUNTRY). The full query that is built in FacetedSearcher.java class looks like ----"+(+(companyId:10154) +(assetCategoryNames:topic2 COUNTRY) +((+(entryClassName:com.liferay.portlet.bookmarks.model.BookmarksEntry)) (+(entryClassName:com.liferay.portlet.blogs.model.BlogsEntry)) (+(entryClassName:com.liferay.portlet.calendar.model.CalEvent)) (+(entryClassName:com.liferay.portlet.documentlibrary.model.DLFileEntry) +(status:0)) ..........".Above if you see the part of query---" (assetCategoryNames:topic2 COUNTRY) ", you will notice that category names are coming but there is no boolean operator added by the system. I have gone through all the above threads, I found ur comments but could not get it completely as what needs to be done to select multiple categories at one time while searching.If any booleanClause need to be set in serachContext then how and what it should be .Please let me know the solution if you are aware of this scenario. Thanks in advance,Himanshu Modi Por favor identifíquese para votar. Contestar como... Cancelar Himanshu Modi Himanshu Modi Hace 11 años Typo--(assetCategoryNames:topic2 assetCategoryNames:COUNTRY) is the correct query I'm getting. Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Himanshu Modi Hace 11 años The correct way to do that would be by passing a set of additional BooleanClauses to the searchContext.setBooleanClauses(BooleanClause[] clauses) method just before making the search. Facets are not designed for doing filtering only for collecting metrics. Por favor identifíquese para votar. Contestar como... Cancelar Kim A Kunc Ray Augé Hace 11 años Hi Ray, is there any way to integrate a custom portlet into the asset entries facet ?My portlet has it's custom Indexer that is registered via liferay-portlet.xml and I added my model in the search-portlet's configuration. If I add an OpenSearch implementation the results are displayed at the bottom of the search, but I can't get it to work with the faceted search. What am I missing? Por favor identifíquese para votar. Contestar como... Cancelar Kim A Kunc Kim A Kunc Hace 11 años I figured it it out, my Indexer extends BaseIndexer but somehow not all keywords are set for the facet query to match my documents. I was missing fields "COMPANY_ID" and "GROUP_ID" that are only set in BaseIndexer if your model is an instance of "AuditedModel" which apparently my model class is not. Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Kim A Kunc Hace 11 años Ok, great! I'm glad you managed to figure it out. Yes, AuditedModel is a helper interface around entities designed to support multi-tenancy.AuditedModel interface will be automatically added to your Model when the entity definition contains the fields: companyId, createDate, modifiedDate, userId, userName.Similarly, the GroupedModel interface provides support for scoping models to groups (a.k.a. Sites) and is applied if the entity is an AuditedModel + has the groupId field.There are several other automatically applied interfaces derived from entity columns, like workflow, attached, resourced, etc. Apparently this is a subject still in need of documentation. Por favor identifíquese para votar. Contestar como... Cancelar Kim A Kunc Ray Augé Hace 11 años Ray, thanks for your reply!What would think of a new feature in the service builder definition that would automatically create these audit fields i.e. a new property "auditedModel=true/false" ? Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Kim A Kunc Hace 11 años That would be cool (JIRA feature request?). Por favor identifíquese para votar. Contestar como... Cancelar Denis Signoretto Ray Augé Hace 11 años Hi Ray,A really useful article. Can you tell me if the same functionalities are available through web services or JSON requests (via portal-client.jar) ?Thanks,Denis. Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Denis Signoretto Hace 11 años Unfortunately not at the moment (JIRA feature request?). Por favor identifíquese para votar. Contestar como... Cancelar Matteo S Ray Augé Hace 11 años Hi Ray,I do understand your point about facet's design. However, as others have pointed out, there's a strong use case regarding drilled down search.As of 6.1GA2, I don't see any possible solution which can be developed by using a jsp hook. We can't use multiple facets on the same term, and current implementation has BooleanClauseOccur.SHOULD hardcoded. MultiValueFacet (btw thanks for explaining its name) does handle multiple terms, so why you say that ain't the right place to edit the query?Look at @Himanshu case as example:- requirement: filter search with multiple terms on the same element- terms:topic2,COUNTRY- current implementation produces (assetCategoryNames:topic2 assetCategoryNames:COUNTRY): result is OR between these clauses- my proposal http://issues.liferay.com/browse/LPS-28228: let admin decide facet clauseexample result with (AND -BooleanClauseOccur.MUST ) -> (assetCategoryNames:topic2 AND assetCategoryNames:COUNTRY)I don't want to use a single facet to search on multiple fields, instead I need the option to produce and AND booleanQuery.I'm already using this approach on a couple of projects, because of deadlines, but I'm more than open to suggestions on a better way to implement this. Your explanations are really valuable.Thanks for your response, and sorry for my English..Matteo Por favor identifíquese para votar. Contestar como... Cancelar
Ray Augé ASI Register Hace 11 años Yeah, this was deferred to a later version. Technically the backend code can handle any number of arguments per facet, but in order to get a first cut, simple to use UI we opted to limit it to only a single argument per facet. BUT, since it's only a limitation from the UI, you can easily create custom facet view template (jsp hook) that overrides the default and allows multiple selection per facet.Can you open a feature request so we can track this for future versions? Por favor identifíquese para votar. Contestar como... Cancelar Matteo S Ray Augé Hace 11 años Hi Ray,I would like to know what is the best way to add a custom facet implementation.I am trying to implement drilled-down search, and I need to produce an AND query for MultiValueFacet. Looking at source, I believe that this can't be done, because termQuery has booleanClause hardcoded (added request http://issues.liferay.com/browse/LPS-28228).Thanks in advance Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Matteo S Hace 11 años Facets are for single fields only (both Bobo [our lucene facet impl] and Solr only have APIs for collecting facet on single fields at a time). But if you need to refine the underlying query so that it reflects some custom logic, then you can do that by passing an array of BooleanClauses to the searchContext before calling search in the FacetedSearcher.SearchContext searchContext = .. // setup the contextIndexer indexer = FacetedSearcher.getInstance();searchContext.setBooleanClauses(BooleanClause[] booleanClauses)Hits hits = indexer.search(searchContext);Note: An AND is simply a MUST "Occur" clause around a number of other Query instances (or Clauses). Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Ray Augé Hace 11 años BTW, the "Multi" in the name MultiValueFacet is not to reflect how it is used with respect to the number of fields to collect data from, but rather to indicate the "type" of field it can be used with. In this case fields with "multiple" values.In indexing engines, fields generally fall into one of two broad classes: - single value fields (like a number, fixed string token)- multi-value fields (like text, or arrays of values)There are certain types of operations that can take place on each of those two classes of fields. For instance, you can't do a Range query on a multi-value field. you generally can't sort a result set on a multi-value field, single value fields must generally be exact matches (setting aside regex matching obviously), etc. Por favor identifíquese para votar. Contestar como... Cancelar Himanshu Modi Ray Augé Hace 11 años Hi Ray,I have the requirements to pass multiple categories names while searching. But Faceted searcher is not giving the results for multiple categories.For example while I pass assetCategoryNames field value as comm separated (say topic2,COUNTRY). The full query that is built in FacetedSearcher.java class looks like ----"+(+(companyId:10154) +(assetCategoryNames:topic2 COUNTRY) +((+(entryClassName:com.liferay.portlet.bookmarks.model.BookmarksEntry)) (+(entryClassName:com.liferay.portlet.blogs.model.BlogsEntry)) (+(entryClassName:com.liferay.portlet.calendar.model.CalEvent)) (+(entryClassName:com.liferay.portlet.documentlibrary.model.DLFileEntry) +(status:0)) ..........".Above if you see the part of query---" (assetCategoryNames:topic2 COUNTRY) ", you will notice that category names are coming but there is no boolean operator added by the system. I have gone through all the above threads, I found ur comments but could not get it completely as what needs to be done to select multiple categories at one time while searching.If any booleanClause need to be set in serachContext then how and what it should be .Please let me know the solution if you are aware of this scenario. Thanks in advance,Himanshu Modi Por favor identifíquese para votar. Contestar como... Cancelar Himanshu Modi Himanshu Modi Hace 11 años Typo--(assetCategoryNames:topic2 assetCategoryNames:COUNTRY) is the correct query I'm getting. Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Himanshu Modi Hace 11 años The correct way to do that would be by passing a set of additional BooleanClauses to the searchContext.setBooleanClauses(BooleanClause[] clauses) method just before making the search. Facets are not designed for doing filtering only for collecting metrics. Por favor identifíquese para votar. Contestar como... Cancelar Kim A Kunc Ray Augé Hace 11 años Hi Ray, is there any way to integrate a custom portlet into the asset entries facet ?My portlet has it's custom Indexer that is registered via liferay-portlet.xml and I added my model in the search-portlet's configuration. If I add an OpenSearch implementation the results are displayed at the bottom of the search, but I can't get it to work with the faceted search. What am I missing? Por favor identifíquese para votar. Contestar como... Cancelar Kim A Kunc Kim A Kunc Hace 11 años I figured it it out, my Indexer extends BaseIndexer but somehow not all keywords are set for the facet query to match my documents. I was missing fields "COMPANY_ID" and "GROUP_ID" that are only set in BaseIndexer if your model is an instance of "AuditedModel" which apparently my model class is not. Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Kim A Kunc Hace 11 años Ok, great! I'm glad you managed to figure it out. Yes, AuditedModel is a helper interface around entities designed to support multi-tenancy.AuditedModel interface will be automatically added to your Model when the entity definition contains the fields: companyId, createDate, modifiedDate, userId, userName.Similarly, the GroupedModel interface provides support for scoping models to groups (a.k.a. Sites) and is applied if the entity is an AuditedModel + has the groupId field.There are several other automatically applied interfaces derived from entity columns, like workflow, attached, resourced, etc. Apparently this is a subject still in need of documentation. Por favor identifíquese para votar. Contestar como... Cancelar Kim A Kunc Ray Augé Hace 11 años Ray, thanks for your reply!What would think of a new feature in the service builder definition that would automatically create these audit fields i.e. a new property "auditedModel=true/false" ? Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Kim A Kunc Hace 11 años That would be cool (JIRA feature request?). Por favor identifíquese para votar. Contestar como... Cancelar Denis Signoretto Ray Augé Hace 11 años Hi Ray,A really useful article. Can you tell me if the same functionalities are available through web services or JSON requests (via portal-client.jar) ?Thanks,Denis. Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Denis Signoretto Hace 11 años Unfortunately not at the moment (JIRA feature request?). Por favor identifíquese para votar. Contestar como... Cancelar Matteo S Ray Augé Hace 11 años Hi Ray,I do understand your point about facet's design. However, as others have pointed out, there's a strong use case regarding drilled down search.As of 6.1GA2, I don't see any possible solution which can be developed by using a jsp hook. We can't use multiple facets on the same term, and current implementation has BooleanClauseOccur.SHOULD hardcoded. MultiValueFacet (btw thanks for explaining its name) does handle multiple terms, so why you say that ain't the right place to edit the query?Look at @Himanshu case as example:- requirement: filter search with multiple terms on the same element- terms:topic2,COUNTRY- current implementation produces (assetCategoryNames:topic2 assetCategoryNames:COUNTRY): result is OR between these clauses- my proposal http://issues.liferay.com/browse/LPS-28228: let admin decide facet clauseexample result with (AND -BooleanClauseOccur.MUST ) -> (assetCategoryNames:topic2 AND assetCategoryNames:COUNTRY)I don't want to use a single facet to search on multiple fields, instead I need the option to produce and AND booleanQuery.I'm already using this approach on a couple of projects, because of deadlines, but I'm more than open to suggestions on a better way to implement this. Your explanations are really valuable.Thanks for your response, and sorry for my English..Matteo Por favor identifíquese para votar. Contestar como... Cancelar
Matteo S Ray Augé Hace 11 años Hi Ray,I would like to know what is the best way to add a custom facet implementation.I am trying to implement drilled-down search, and I need to produce an AND query for MultiValueFacet. Looking at source, I believe that this can't be done, because termQuery has booleanClause hardcoded (added request http://issues.liferay.com/browse/LPS-28228).Thanks in advance Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Matteo S Hace 11 años Facets are for single fields only (both Bobo [our lucene facet impl] and Solr only have APIs for collecting facet on single fields at a time). But if you need to refine the underlying query so that it reflects some custom logic, then you can do that by passing an array of BooleanClauses to the searchContext before calling search in the FacetedSearcher.SearchContext searchContext = .. // setup the contextIndexer indexer = FacetedSearcher.getInstance();searchContext.setBooleanClauses(BooleanClause[] booleanClauses)Hits hits = indexer.search(searchContext);Note: An AND is simply a MUST "Occur" clause around a number of other Query instances (or Clauses). Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Ray Augé Hace 11 años BTW, the "Multi" in the name MultiValueFacet is not to reflect how it is used with respect to the number of fields to collect data from, but rather to indicate the "type" of field it can be used with. In this case fields with "multiple" values.In indexing engines, fields generally fall into one of two broad classes: - single value fields (like a number, fixed string token)- multi-value fields (like text, or arrays of values)There are certain types of operations that can take place on each of those two classes of fields. For instance, you can't do a Range query on a multi-value field. you generally can't sort a result set on a multi-value field, single value fields must generally be exact matches (setting aside regex matching obviously), etc. Por favor identifíquese para votar. Contestar como... Cancelar Himanshu Modi Ray Augé Hace 11 años Hi Ray,I have the requirements to pass multiple categories names while searching. But Faceted searcher is not giving the results for multiple categories.For example while I pass assetCategoryNames field value as comm separated (say topic2,COUNTRY). The full query that is built in FacetedSearcher.java class looks like ----"+(+(companyId:10154) +(assetCategoryNames:topic2 COUNTRY) +((+(entryClassName:com.liferay.portlet.bookmarks.model.BookmarksEntry)) (+(entryClassName:com.liferay.portlet.blogs.model.BlogsEntry)) (+(entryClassName:com.liferay.portlet.calendar.model.CalEvent)) (+(entryClassName:com.liferay.portlet.documentlibrary.model.DLFileEntry) +(status:0)) ..........".Above if you see the part of query---" (assetCategoryNames:topic2 COUNTRY) ", you will notice that category names are coming but there is no boolean operator added by the system. I have gone through all the above threads, I found ur comments but could not get it completely as what needs to be done to select multiple categories at one time while searching.If any booleanClause need to be set in serachContext then how and what it should be .Please let me know the solution if you are aware of this scenario. Thanks in advance,Himanshu Modi Por favor identifíquese para votar. Contestar como... Cancelar Himanshu Modi Himanshu Modi Hace 11 años Typo--(assetCategoryNames:topic2 assetCategoryNames:COUNTRY) is the correct query I'm getting. Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Himanshu Modi Hace 11 años The correct way to do that would be by passing a set of additional BooleanClauses to the searchContext.setBooleanClauses(BooleanClause[] clauses) method just before making the search. Facets are not designed for doing filtering only for collecting metrics. Por favor identifíquese para votar. Contestar como... Cancelar Kim A Kunc Ray Augé Hace 11 años Hi Ray, is there any way to integrate a custom portlet into the asset entries facet ?My portlet has it's custom Indexer that is registered via liferay-portlet.xml and I added my model in the search-portlet's configuration. If I add an OpenSearch implementation the results are displayed at the bottom of the search, but I can't get it to work with the faceted search. What am I missing? Por favor identifíquese para votar. Contestar como... Cancelar Kim A Kunc Kim A Kunc Hace 11 años I figured it it out, my Indexer extends BaseIndexer but somehow not all keywords are set for the facet query to match my documents. I was missing fields "COMPANY_ID" and "GROUP_ID" that are only set in BaseIndexer if your model is an instance of "AuditedModel" which apparently my model class is not. Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Kim A Kunc Hace 11 años Ok, great! I'm glad you managed to figure it out. Yes, AuditedModel is a helper interface around entities designed to support multi-tenancy.AuditedModel interface will be automatically added to your Model when the entity definition contains the fields: companyId, createDate, modifiedDate, userId, userName.Similarly, the GroupedModel interface provides support for scoping models to groups (a.k.a. Sites) and is applied if the entity is an AuditedModel + has the groupId field.There are several other automatically applied interfaces derived from entity columns, like workflow, attached, resourced, etc. Apparently this is a subject still in need of documentation. Por favor identifíquese para votar. Contestar como... Cancelar Kim A Kunc Ray Augé Hace 11 años Ray, thanks for your reply!What would think of a new feature in the service builder definition that would automatically create these audit fields i.e. a new property "auditedModel=true/false" ? Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Kim A Kunc Hace 11 años That would be cool (JIRA feature request?). Por favor identifíquese para votar. Contestar como... Cancelar Denis Signoretto Ray Augé Hace 11 años Hi Ray,A really useful article. Can you tell me if the same functionalities are available through web services or JSON requests (via portal-client.jar) ?Thanks,Denis. Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Denis Signoretto Hace 11 años Unfortunately not at the moment (JIRA feature request?). Por favor identifíquese para votar. Contestar como... Cancelar Matteo S Ray Augé Hace 11 años Hi Ray,I do understand your point about facet's design. However, as others have pointed out, there's a strong use case regarding drilled down search.As of 6.1GA2, I don't see any possible solution which can be developed by using a jsp hook. We can't use multiple facets on the same term, and current implementation has BooleanClauseOccur.SHOULD hardcoded. MultiValueFacet (btw thanks for explaining its name) does handle multiple terms, so why you say that ain't the right place to edit the query?Look at @Himanshu case as example:- requirement: filter search with multiple terms on the same element- terms:topic2,COUNTRY- current implementation produces (assetCategoryNames:topic2 assetCategoryNames:COUNTRY): result is OR between these clauses- my proposal http://issues.liferay.com/browse/LPS-28228: let admin decide facet clauseexample result with (AND -BooleanClauseOccur.MUST ) -> (assetCategoryNames:topic2 AND assetCategoryNames:COUNTRY)I don't want to use a single facet to search on multiple fields, instead I need the option to produce and AND booleanQuery.I'm already using this approach on a couple of projects, because of deadlines, but I'm more than open to suggestions on a better way to implement this. Your explanations are really valuable.Thanks for your response, and sorry for my English..Matteo Por favor identifíquese para votar. Contestar como... Cancelar
Ray Augé Matteo S Hace 11 años Facets are for single fields only (both Bobo [our lucene facet impl] and Solr only have APIs for collecting facet on single fields at a time). But if you need to refine the underlying query so that it reflects some custom logic, then you can do that by passing an array of BooleanClauses to the searchContext before calling search in the FacetedSearcher.SearchContext searchContext = .. // setup the contextIndexer indexer = FacetedSearcher.getInstance();searchContext.setBooleanClauses(BooleanClause[] booleanClauses)Hits hits = indexer.search(searchContext);Note: An AND is simply a MUST "Occur" clause around a number of other Query instances (or Clauses). Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Ray Augé Hace 11 años BTW, the "Multi" in the name MultiValueFacet is not to reflect how it is used with respect to the number of fields to collect data from, but rather to indicate the "type" of field it can be used with. In this case fields with "multiple" values.In indexing engines, fields generally fall into one of two broad classes: - single value fields (like a number, fixed string token)- multi-value fields (like text, or arrays of values)There are certain types of operations that can take place on each of those two classes of fields. For instance, you can't do a Range query on a multi-value field. you generally can't sort a result set on a multi-value field, single value fields must generally be exact matches (setting aside regex matching obviously), etc. Por favor identifíquese para votar. Contestar como... Cancelar Himanshu Modi Ray Augé Hace 11 años Hi Ray,I have the requirements to pass multiple categories names while searching. But Faceted searcher is not giving the results for multiple categories.For example while I pass assetCategoryNames field value as comm separated (say topic2,COUNTRY). The full query that is built in FacetedSearcher.java class looks like ----"+(+(companyId:10154) +(assetCategoryNames:topic2 COUNTRY) +((+(entryClassName:com.liferay.portlet.bookmarks.model.BookmarksEntry)) (+(entryClassName:com.liferay.portlet.blogs.model.BlogsEntry)) (+(entryClassName:com.liferay.portlet.calendar.model.CalEvent)) (+(entryClassName:com.liferay.portlet.documentlibrary.model.DLFileEntry) +(status:0)) ..........".Above if you see the part of query---" (assetCategoryNames:topic2 COUNTRY) ", you will notice that category names are coming but there is no boolean operator added by the system. I have gone through all the above threads, I found ur comments but could not get it completely as what needs to be done to select multiple categories at one time while searching.If any booleanClause need to be set in serachContext then how and what it should be .Please let me know the solution if you are aware of this scenario. Thanks in advance,Himanshu Modi Por favor identifíquese para votar. Contestar como... Cancelar Himanshu Modi Himanshu Modi Hace 11 años Typo--(assetCategoryNames:topic2 assetCategoryNames:COUNTRY) is the correct query I'm getting. Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Himanshu Modi Hace 11 años The correct way to do that would be by passing a set of additional BooleanClauses to the searchContext.setBooleanClauses(BooleanClause[] clauses) method just before making the search. Facets are not designed for doing filtering only for collecting metrics. Por favor identifíquese para votar. Contestar como... Cancelar Kim A Kunc Ray Augé Hace 11 años Hi Ray, is there any way to integrate a custom portlet into the asset entries facet ?My portlet has it's custom Indexer that is registered via liferay-portlet.xml and I added my model in the search-portlet's configuration. If I add an OpenSearch implementation the results are displayed at the bottom of the search, but I can't get it to work with the faceted search. What am I missing? Por favor identifíquese para votar. Contestar como... Cancelar Kim A Kunc Kim A Kunc Hace 11 años I figured it it out, my Indexer extends BaseIndexer but somehow not all keywords are set for the facet query to match my documents. I was missing fields "COMPANY_ID" and "GROUP_ID" that are only set in BaseIndexer if your model is an instance of "AuditedModel" which apparently my model class is not. Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Kim A Kunc Hace 11 años Ok, great! I'm glad you managed to figure it out. Yes, AuditedModel is a helper interface around entities designed to support multi-tenancy.AuditedModel interface will be automatically added to your Model when the entity definition contains the fields: companyId, createDate, modifiedDate, userId, userName.Similarly, the GroupedModel interface provides support for scoping models to groups (a.k.a. Sites) and is applied if the entity is an AuditedModel + has the groupId field.There are several other automatically applied interfaces derived from entity columns, like workflow, attached, resourced, etc. Apparently this is a subject still in need of documentation. Por favor identifíquese para votar. Contestar como... Cancelar Kim A Kunc Ray Augé Hace 11 años Ray, thanks for your reply!What would think of a new feature in the service builder definition that would automatically create these audit fields i.e. a new property "auditedModel=true/false" ? Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Kim A Kunc Hace 11 años That would be cool (JIRA feature request?). Por favor identifíquese para votar. Contestar como... Cancelar Denis Signoretto Ray Augé Hace 11 años Hi Ray,A really useful article. Can you tell me if the same functionalities are available through web services or JSON requests (via portal-client.jar) ?Thanks,Denis. Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Denis Signoretto Hace 11 años Unfortunately not at the moment (JIRA feature request?). Por favor identifíquese para votar. Contestar como... Cancelar Matteo S Ray Augé Hace 11 años Hi Ray,I do understand your point about facet's design. However, as others have pointed out, there's a strong use case regarding drilled down search.As of 6.1GA2, I don't see any possible solution which can be developed by using a jsp hook. We can't use multiple facets on the same term, and current implementation has BooleanClauseOccur.SHOULD hardcoded. MultiValueFacet (btw thanks for explaining its name) does handle multiple terms, so why you say that ain't the right place to edit the query?Look at @Himanshu case as example:- requirement: filter search with multiple terms on the same element- terms:topic2,COUNTRY- current implementation produces (assetCategoryNames:topic2 assetCategoryNames:COUNTRY): result is OR between these clauses- my proposal http://issues.liferay.com/browse/LPS-28228: let admin decide facet clauseexample result with (AND -BooleanClauseOccur.MUST ) -> (assetCategoryNames:topic2 AND assetCategoryNames:COUNTRY)I don't want to use a single facet to search on multiple fields, instead I need the option to produce and AND booleanQuery.I'm already using this approach on a couple of projects, because of deadlines, but I'm more than open to suggestions on a better way to implement this. Your explanations are really valuable.Thanks for your response, and sorry for my English..Matteo Por favor identifíquese para votar. Contestar como... Cancelar
Ray Augé Ray Augé Hace 11 años BTW, the "Multi" in the name MultiValueFacet is not to reflect how it is used with respect to the number of fields to collect data from, but rather to indicate the "type" of field it can be used with. In this case fields with "multiple" values.In indexing engines, fields generally fall into one of two broad classes: - single value fields (like a number, fixed string token)- multi-value fields (like text, or arrays of values)There are certain types of operations that can take place on each of those two classes of fields. For instance, you can't do a Range query on a multi-value field. you generally can't sort a result set on a multi-value field, single value fields must generally be exact matches (setting aside regex matching obviously), etc. Por favor identifíquese para votar. Contestar como... Cancelar Himanshu Modi Ray Augé Hace 11 años Hi Ray,I have the requirements to pass multiple categories names while searching. But Faceted searcher is not giving the results for multiple categories.For example while I pass assetCategoryNames field value as comm separated (say topic2,COUNTRY). The full query that is built in FacetedSearcher.java class looks like ----"+(+(companyId:10154) +(assetCategoryNames:topic2 COUNTRY) +((+(entryClassName:com.liferay.portlet.bookmarks.model.BookmarksEntry)) (+(entryClassName:com.liferay.portlet.blogs.model.BlogsEntry)) (+(entryClassName:com.liferay.portlet.calendar.model.CalEvent)) (+(entryClassName:com.liferay.portlet.documentlibrary.model.DLFileEntry) +(status:0)) ..........".Above if you see the part of query---" (assetCategoryNames:topic2 COUNTRY) ", you will notice that category names are coming but there is no boolean operator added by the system. I have gone through all the above threads, I found ur comments but could not get it completely as what needs to be done to select multiple categories at one time while searching.If any booleanClause need to be set in serachContext then how and what it should be .Please let me know the solution if you are aware of this scenario. Thanks in advance,Himanshu Modi Por favor identifíquese para votar. Contestar como... Cancelar Himanshu Modi Himanshu Modi Hace 11 años Typo--(assetCategoryNames:topic2 assetCategoryNames:COUNTRY) is the correct query I'm getting. Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Himanshu Modi Hace 11 años The correct way to do that would be by passing a set of additional BooleanClauses to the searchContext.setBooleanClauses(BooleanClause[] clauses) method just before making the search. Facets are not designed for doing filtering only for collecting metrics. Por favor identifíquese para votar. Contestar como... Cancelar Kim A Kunc Ray Augé Hace 11 años Hi Ray, is there any way to integrate a custom portlet into the asset entries facet ?My portlet has it's custom Indexer that is registered via liferay-portlet.xml and I added my model in the search-portlet's configuration. If I add an OpenSearch implementation the results are displayed at the bottom of the search, but I can't get it to work with the faceted search. What am I missing? Por favor identifíquese para votar. Contestar como... Cancelar Kim A Kunc Kim A Kunc Hace 11 años I figured it it out, my Indexer extends BaseIndexer but somehow not all keywords are set for the facet query to match my documents. I was missing fields "COMPANY_ID" and "GROUP_ID" that are only set in BaseIndexer if your model is an instance of "AuditedModel" which apparently my model class is not. Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Kim A Kunc Hace 11 años Ok, great! I'm glad you managed to figure it out. Yes, AuditedModel is a helper interface around entities designed to support multi-tenancy.AuditedModel interface will be automatically added to your Model when the entity definition contains the fields: companyId, createDate, modifiedDate, userId, userName.Similarly, the GroupedModel interface provides support for scoping models to groups (a.k.a. Sites) and is applied if the entity is an AuditedModel + has the groupId field.There are several other automatically applied interfaces derived from entity columns, like workflow, attached, resourced, etc. Apparently this is a subject still in need of documentation. Por favor identifíquese para votar. Contestar como... Cancelar Kim A Kunc Ray Augé Hace 11 años Ray, thanks for your reply!What would think of a new feature in the service builder definition that would automatically create these audit fields i.e. a new property "auditedModel=true/false" ? Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Kim A Kunc Hace 11 años That would be cool (JIRA feature request?). Por favor identifíquese para votar. Contestar como... Cancelar Denis Signoretto Ray Augé Hace 11 años Hi Ray,A really useful article. Can you tell me if the same functionalities are available through web services or JSON requests (via portal-client.jar) ?Thanks,Denis. Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Denis Signoretto Hace 11 años Unfortunately not at the moment (JIRA feature request?). Por favor identifíquese para votar. Contestar como... Cancelar Matteo S Ray Augé Hace 11 años Hi Ray,I do understand your point about facet's design. However, as others have pointed out, there's a strong use case regarding drilled down search.As of 6.1GA2, I don't see any possible solution which can be developed by using a jsp hook. We can't use multiple facets on the same term, and current implementation has BooleanClauseOccur.SHOULD hardcoded. MultiValueFacet (btw thanks for explaining its name) does handle multiple terms, so why you say that ain't the right place to edit the query?Look at @Himanshu case as example:- requirement: filter search with multiple terms on the same element- terms:topic2,COUNTRY- current implementation produces (assetCategoryNames:topic2 assetCategoryNames:COUNTRY): result is OR between these clauses- my proposal http://issues.liferay.com/browse/LPS-28228: let admin decide facet clauseexample result with (AND -BooleanClauseOccur.MUST ) -> (assetCategoryNames:topic2 AND assetCategoryNames:COUNTRY)I don't want to use a single facet to search on multiple fields, instead I need the option to produce and AND booleanQuery.I'm already using this approach on a couple of projects, because of deadlines, but I'm more than open to suggestions on a better way to implement this. Your explanations are really valuable.Thanks for your response, and sorry for my English..Matteo Por favor identifíquese para votar. Contestar como... Cancelar
Himanshu Modi Ray Augé Hace 11 años Hi Ray,I have the requirements to pass multiple categories names while searching. But Faceted searcher is not giving the results for multiple categories.For example while I pass assetCategoryNames field value as comm separated (say topic2,COUNTRY). The full query that is built in FacetedSearcher.java class looks like ----"+(+(companyId:10154) +(assetCategoryNames:topic2 COUNTRY) +((+(entryClassName:com.liferay.portlet.bookmarks.model.BookmarksEntry)) (+(entryClassName:com.liferay.portlet.blogs.model.BlogsEntry)) (+(entryClassName:com.liferay.portlet.calendar.model.CalEvent)) (+(entryClassName:com.liferay.portlet.documentlibrary.model.DLFileEntry) +(status:0)) ..........".Above if you see the part of query---" (assetCategoryNames:topic2 COUNTRY) ", you will notice that category names are coming but there is no boolean operator added by the system. I have gone through all the above threads, I found ur comments but could not get it completely as what needs to be done to select multiple categories at one time while searching.If any booleanClause need to be set in serachContext then how and what it should be .Please let me know the solution if you are aware of this scenario. Thanks in advance,Himanshu Modi Por favor identifíquese para votar. Contestar como... Cancelar Himanshu Modi Himanshu Modi Hace 11 años Typo--(assetCategoryNames:topic2 assetCategoryNames:COUNTRY) is the correct query I'm getting. Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Himanshu Modi Hace 11 años The correct way to do that would be by passing a set of additional BooleanClauses to the searchContext.setBooleanClauses(BooleanClause[] clauses) method just before making the search. Facets are not designed for doing filtering only for collecting metrics. Por favor identifíquese para votar. Contestar como... Cancelar Kim A Kunc Ray Augé Hace 11 años Hi Ray, is there any way to integrate a custom portlet into the asset entries facet ?My portlet has it's custom Indexer that is registered via liferay-portlet.xml and I added my model in the search-portlet's configuration. If I add an OpenSearch implementation the results are displayed at the bottom of the search, but I can't get it to work with the faceted search. What am I missing? Por favor identifíquese para votar. Contestar como... Cancelar Kim A Kunc Kim A Kunc Hace 11 años I figured it it out, my Indexer extends BaseIndexer but somehow not all keywords are set for the facet query to match my documents. I was missing fields "COMPANY_ID" and "GROUP_ID" that are only set in BaseIndexer if your model is an instance of "AuditedModel" which apparently my model class is not. Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Kim A Kunc Hace 11 años Ok, great! I'm glad you managed to figure it out. Yes, AuditedModel is a helper interface around entities designed to support multi-tenancy.AuditedModel interface will be automatically added to your Model when the entity definition contains the fields: companyId, createDate, modifiedDate, userId, userName.Similarly, the GroupedModel interface provides support for scoping models to groups (a.k.a. Sites) and is applied if the entity is an AuditedModel + has the groupId field.There are several other automatically applied interfaces derived from entity columns, like workflow, attached, resourced, etc. Apparently this is a subject still in need of documentation. Por favor identifíquese para votar. Contestar como... Cancelar Kim A Kunc Ray Augé Hace 11 años Ray, thanks for your reply!What would think of a new feature in the service builder definition that would automatically create these audit fields i.e. a new property "auditedModel=true/false" ? Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Kim A Kunc Hace 11 años That would be cool (JIRA feature request?). Por favor identifíquese para votar. Contestar como... Cancelar Denis Signoretto Ray Augé Hace 11 años Hi Ray,A really useful article. Can you tell me if the same functionalities are available through web services or JSON requests (via portal-client.jar) ?Thanks,Denis. Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Denis Signoretto Hace 11 años Unfortunately not at the moment (JIRA feature request?). Por favor identifíquese para votar. Contestar como... Cancelar Matteo S Ray Augé Hace 11 años Hi Ray,I do understand your point about facet's design. However, as others have pointed out, there's a strong use case regarding drilled down search.As of 6.1GA2, I don't see any possible solution which can be developed by using a jsp hook. We can't use multiple facets on the same term, and current implementation has BooleanClauseOccur.SHOULD hardcoded. MultiValueFacet (btw thanks for explaining its name) does handle multiple terms, so why you say that ain't the right place to edit the query?Look at @Himanshu case as example:- requirement: filter search with multiple terms on the same element- terms:topic2,COUNTRY- current implementation produces (assetCategoryNames:topic2 assetCategoryNames:COUNTRY): result is OR between these clauses- my proposal http://issues.liferay.com/browse/LPS-28228: let admin decide facet clauseexample result with (AND -BooleanClauseOccur.MUST ) -> (assetCategoryNames:topic2 AND assetCategoryNames:COUNTRY)I don't want to use a single facet to search on multiple fields, instead I need the option to produce and AND booleanQuery.I'm already using this approach on a couple of projects, because of deadlines, but I'm more than open to suggestions on a better way to implement this. Your explanations are really valuable.Thanks for your response, and sorry for my English..Matteo Por favor identifíquese para votar. Contestar como... Cancelar
Himanshu Modi Himanshu Modi Hace 11 años Typo--(assetCategoryNames:topic2 assetCategoryNames:COUNTRY) is the correct query I'm getting. Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Himanshu Modi Hace 11 años The correct way to do that would be by passing a set of additional BooleanClauses to the searchContext.setBooleanClauses(BooleanClause[] clauses) method just before making the search. Facets are not designed for doing filtering only for collecting metrics. Por favor identifíquese para votar. Contestar como... Cancelar Kim A Kunc Ray Augé Hace 11 años Hi Ray, is there any way to integrate a custom portlet into the asset entries facet ?My portlet has it's custom Indexer that is registered via liferay-portlet.xml and I added my model in the search-portlet's configuration. If I add an OpenSearch implementation the results are displayed at the bottom of the search, but I can't get it to work with the faceted search. What am I missing? Por favor identifíquese para votar. Contestar como... Cancelar Kim A Kunc Kim A Kunc Hace 11 años I figured it it out, my Indexer extends BaseIndexer but somehow not all keywords are set for the facet query to match my documents. I was missing fields "COMPANY_ID" and "GROUP_ID" that are only set in BaseIndexer if your model is an instance of "AuditedModel" which apparently my model class is not. Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Kim A Kunc Hace 11 años Ok, great! I'm glad you managed to figure it out. Yes, AuditedModel is a helper interface around entities designed to support multi-tenancy.AuditedModel interface will be automatically added to your Model when the entity definition contains the fields: companyId, createDate, modifiedDate, userId, userName.Similarly, the GroupedModel interface provides support for scoping models to groups (a.k.a. Sites) and is applied if the entity is an AuditedModel + has the groupId field.There are several other automatically applied interfaces derived from entity columns, like workflow, attached, resourced, etc. Apparently this is a subject still in need of documentation. Por favor identifíquese para votar. Contestar como... Cancelar Kim A Kunc Ray Augé Hace 11 años Ray, thanks for your reply!What would think of a new feature in the service builder definition that would automatically create these audit fields i.e. a new property "auditedModel=true/false" ? Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Kim A Kunc Hace 11 años That would be cool (JIRA feature request?). Por favor identifíquese para votar. Contestar como... Cancelar Denis Signoretto Ray Augé Hace 11 años Hi Ray,A really useful article. Can you tell me if the same functionalities are available through web services or JSON requests (via portal-client.jar) ?Thanks,Denis. Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Denis Signoretto Hace 11 años Unfortunately not at the moment (JIRA feature request?). Por favor identifíquese para votar. Contestar como... Cancelar Matteo S Ray Augé Hace 11 años Hi Ray,I do understand your point about facet's design. However, as others have pointed out, there's a strong use case regarding drilled down search.As of 6.1GA2, I don't see any possible solution which can be developed by using a jsp hook. We can't use multiple facets on the same term, and current implementation has BooleanClauseOccur.SHOULD hardcoded. MultiValueFacet (btw thanks for explaining its name) does handle multiple terms, so why you say that ain't the right place to edit the query?Look at @Himanshu case as example:- requirement: filter search with multiple terms on the same element- terms:topic2,COUNTRY- current implementation produces (assetCategoryNames:topic2 assetCategoryNames:COUNTRY): result is OR between these clauses- my proposal http://issues.liferay.com/browse/LPS-28228: let admin decide facet clauseexample result with (AND -BooleanClauseOccur.MUST ) -> (assetCategoryNames:topic2 AND assetCategoryNames:COUNTRY)I don't want to use a single facet to search on multiple fields, instead I need the option to produce and AND booleanQuery.I'm already using this approach on a couple of projects, because of deadlines, but I'm more than open to suggestions on a better way to implement this. Your explanations are really valuable.Thanks for your response, and sorry for my English..Matteo Por favor identifíquese para votar. Contestar como... Cancelar
Ray Augé Himanshu Modi Hace 11 años The correct way to do that would be by passing a set of additional BooleanClauses to the searchContext.setBooleanClauses(BooleanClause[] clauses) method just before making the search. Facets are not designed for doing filtering only for collecting metrics. Por favor identifíquese para votar. Contestar como... Cancelar Kim A Kunc Ray Augé Hace 11 años Hi Ray, is there any way to integrate a custom portlet into the asset entries facet ?My portlet has it's custom Indexer that is registered via liferay-portlet.xml and I added my model in the search-portlet's configuration. If I add an OpenSearch implementation the results are displayed at the bottom of the search, but I can't get it to work with the faceted search. What am I missing? Por favor identifíquese para votar. Contestar como... Cancelar Kim A Kunc Kim A Kunc Hace 11 años I figured it it out, my Indexer extends BaseIndexer but somehow not all keywords are set for the facet query to match my documents. I was missing fields "COMPANY_ID" and "GROUP_ID" that are only set in BaseIndexer if your model is an instance of "AuditedModel" which apparently my model class is not. Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Kim A Kunc Hace 11 años Ok, great! I'm glad you managed to figure it out. Yes, AuditedModel is a helper interface around entities designed to support multi-tenancy.AuditedModel interface will be automatically added to your Model when the entity definition contains the fields: companyId, createDate, modifiedDate, userId, userName.Similarly, the GroupedModel interface provides support for scoping models to groups (a.k.a. Sites) and is applied if the entity is an AuditedModel + has the groupId field.There are several other automatically applied interfaces derived from entity columns, like workflow, attached, resourced, etc. Apparently this is a subject still in need of documentation. Por favor identifíquese para votar. Contestar como... Cancelar Kim A Kunc Ray Augé Hace 11 años Ray, thanks for your reply!What would think of a new feature in the service builder definition that would automatically create these audit fields i.e. a new property "auditedModel=true/false" ? Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Kim A Kunc Hace 11 años That would be cool (JIRA feature request?). Por favor identifíquese para votar. Contestar como... Cancelar Denis Signoretto Ray Augé Hace 11 años Hi Ray,A really useful article. Can you tell me if the same functionalities are available through web services or JSON requests (via portal-client.jar) ?Thanks,Denis. Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Denis Signoretto Hace 11 años Unfortunately not at the moment (JIRA feature request?). Por favor identifíquese para votar. Contestar como... Cancelar Matteo S Ray Augé Hace 11 años Hi Ray,I do understand your point about facet's design. However, as others have pointed out, there's a strong use case regarding drilled down search.As of 6.1GA2, I don't see any possible solution which can be developed by using a jsp hook. We can't use multiple facets on the same term, and current implementation has BooleanClauseOccur.SHOULD hardcoded. MultiValueFacet (btw thanks for explaining its name) does handle multiple terms, so why you say that ain't the right place to edit the query?Look at @Himanshu case as example:- requirement: filter search with multiple terms on the same element- terms:topic2,COUNTRY- current implementation produces (assetCategoryNames:topic2 assetCategoryNames:COUNTRY): result is OR between these clauses- my proposal http://issues.liferay.com/browse/LPS-28228: let admin decide facet clauseexample result with (AND -BooleanClauseOccur.MUST ) -> (assetCategoryNames:topic2 AND assetCategoryNames:COUNTRY)I don't want to use a single facet to search on multiple fields, instead I need the option to produce and AND booleanQuery.I'm already using this approach on a couple of projects, because of deadlines, but I'm more than open to suggestions on a better way to implement this. Your explanations are really valuable.Thanks for your response, and sorry for my English..Matteo Por favor identifíquese para votar. Contestar como... Cancelar
Kim A Kunc Ray Augé Hace 11 años Hi Ray, is there any way to integrate a custom portlet into the asset entries facet ?My portlet has it's custom Indexer that is registered via liferay-portlet.xml and I added my model in the search-portlet's configuration. If I add an OpenSearch implementation the results are displayed at the bottom of the search, but I can't get it to work with the faceted search. What am I missing? Por favor identifíquese para votar. Contestar como... Cancelar Kim A Kunc Kim A Kunc Hace 11 años I figured it it out, my Indexer extends BaseIndexer but somehow not all keywords are set for the facet query to match my documents. I was missing fields "COMPANY_ID" and "GROUP_ID" that are only set in BaseIndexer if your model is an instance of "AuditedModel" which apparently my model class is not. Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Kim A Kunc Hace 11 años Ok, great! I'm glad you managed to figure it out. Yes, AuditedModel is a helper interface around entities designed to support multi-tenancy.AuditedModel interface will be automatically added to your Model when the entity definition contains the fields: companyId, createDate, modifiedDate, userId, userName.Similarly, the GroupedModel interface provides support for scoping models to groups (a.k.a. Sites) and is applied if the entity is an AuditedModel + has the groupId field.There are several other automatically applied interfaces derived from entity columns, like workflow, attached, resourced, etc. Apparently this is a subject still in need of documentation. Por favor identifíquese para votar. Contestar como... Cancelar Kim A Kunc Ray Augé Hace 11 años Ray, thanks for your reply!What would think of a new feature in the service builder definition that would automatically create these audit fields i.e. a new property "auditedModel=true/false" ? Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Kim A Kunc Hace 11 años That would be cool (JIRA feature request?). Por favor identifíquese para votar. Contestar como... Cancelar Denis Signoretto Ray Augé Hace 11 años Hi Ray,A really useful article. Can you tell me if the same functionalities are available through web services or JSON requests (via portal-client.jar) ?Thanks,Denis. Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Denis Signoretto Hace 11 años Unfortunately not at the moment (JIRA feature request?). Por favor identifíquese para votar. Contestar como... Cancelar Matteo S Ray Augé Hace 11 años Hi Ray,I do understand your point about facet's design. However, as others have pointed out, there's a strong use case regarding drilled down search.As of 6.1GA2, I don't see any possible solution which can be developed by using a jsp hook. We can't use multiple facets on the same term, and current implementation has BooleanClauseOccur.SHOULD hardcoded. MultiValueFacet (btw thanks for explaining its name) does handle multiple terms, so why you say that ain't the right place to edit the query?Look at @Himanshu case as example:- requirement: filter search with multiple terms on the same element- terms:topic2,COUNTRY- current implementation produces (assetCategoryNames:topic2 assetCategoryNames:COUNTRY): result is OR between these clauses- my proposal http://issues.liferay.com/browse/LPS-28228: let admin decide facet clauseexample result with (AND -BooleanClauseOccur.MUST ) -> (assetCategoryNames:topic2 AND assetCategoryNames:COUNTRY)I don't want to use a single facet to search on multiple fields, instead I need the option to produce and AND booleanQuery.I'm already using this approach on a couple of projects, because of deadlines, but I'm more than open to suggestions on a better way to implement this. Your explanations are really valuable.Thanks for your response, and sorry for my English..Matteo Por favor identifíquese para votar. Contestar como... Cancelar
Kim A Kunc Kim A Kunc Hace 11 años I figured it it out, my Indexer extends BaseIndexer but somehow not all keywords are set for the facet query to match my documents. I was missing fields "COMPANY_ID" and "GROUP_ID" that are only set in BaseIndexer if your model is an instance of "AuditedModel" which apparently my model class is not. Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Kim A Kunc Hace 11 años Ok, great! I'm glad you managed to figure it out. Yes, AuditedModel is a helper interface around entities designed to support multi-tenancy.AuditedModel interface will be automatically added to your Model when the entity definition contains the fields: companyId, createDate, modifiedDate, userId, userName.Similarly, the GroupedModel interface provides support for scoping models to groups (a.k.a. Sites) and is applied if the entity is an AuditedModel + has the groupId field.There are several other automatically applied interfaces derived from entity columns, like workflow, attached, resourced, etc. Apparently this is a subject still in need of documentation. Por favor identifíquese para votar. Contestar como... Cancelar Kim A Kunc Ray Augé Hace 11 años Ray, thanks for your reply!What would think of a new feature in the service builder definition that would automatically create these audit fields i.e. a new property "auditedModel=true/false" ? Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Kim A Kunc Hace 11 años That would be cool (JIRA feature request?). Por favor identifíquese para votar. Contestar como... Cancelar Denis Signoretto Ray Augé Hace 11 años Hi Ray,A really useful article. Can you tell me if the same functionalities are available through web services or JSON requests (via portal-client.jar) ?Thanks,Denis. Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Denis Signoretto Hace 11 años Unfortunately not at the moment (JIRA feature request?). Por favor identifíquese para votar. Contestar como... Cancelar Matteo S Ray Augé Hace 11 años Hi Ray,I do understand your point about facet's design. However, as others have pointed out, there's a strong use case regarding drilled down search.As of 6.1GA2, I don't see any possible solution which can be developed by using a jsp hook. We can't use multiple facets on the same term, and current implementation has BooleanClauseOccur.SHOULD hardcoded. MultiValueFacet (btw thanks for explaining its name) does handle multiple terms, so why you say that ain't the right place to edit the query?Look at @Himanshu case as example:- requirement: filter search with multiple terms on the same element- terms:topic2,COUNTRY- current implementation produces (assetCategoryNames:topic2 assetCategoryNames:COUNTRY): result is OR between these clauses- my proposal http://issues.liferay.com/browse/LPS-28228: let admin decide facet clauseexample result with (AND -BooleanClauseOccur.MUST ) -> (assetCategoryNames:topic2 AND assetCategoryNames:COUNTRY)I don't want to use a single facet to search on multiple fields, instead I need the option to produce and AND booleanQuery.I'm already using this approach on a couple of projects, because of deadlines, but I'm more than open to suggestions on a better way to implement this. Your explanations are really valuable.Thanks for your response, and sorry for my English..Matteo Por favor identifíquese para votar. Contestar como... Cancelar
Ray Augé Kim A Kunc Hace 11 años Ok, great! I'm glad you managed to figure it out. Yes, AuditedModel is a helper interface around entities designed to support multi-tenancy.AuditedModel interface will be automatically added to your Model when the entity definition contains the fields: companyId, createDate, modifiedDate, userId, userName.Similarly, the GroupedModel interface provides support for scoping models to groups (a.k.a. Sites) and is applied if the entity is an AuditedModel + has the groupId field.There are several other automatically applied interfaces derived from entity columns, like workflow, attached, resourced, etc. Apparently this is a subject still in need of documentation. Por favor identifíquese para votar. Contestar como... Cancelar Kim A Kunc Ray Augé Hace 11 años Ray, thanks for your reply!What would think of a new feature in the service builder definition that would automatically create these audit fields i.e. a new property "auditedModel=true/false" ? Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Kim A Kunc Hace 11 años That would be cool (JIRA feature request?). Por favor identifíquese para votar. Contestar como... Cancelar Denis Signoretto Ray Augé Hace 11 años Hi Ray,A really useful article. Can you tell me if the same functionalities are available through web services or JSON requests (via portal-client.jar) ?Thanks,Denis. Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Denis Signoretto Hace 11 años Unfortunately not at the moment (JIRA feature request?). Por favor identifíquese para votar. Contestar como... Cancelar Matteo S Ray Augé Hace 11 años Hi Ray,I do understand your point about facet's design. However, as others have pointed out, there's a strong use case regarding drilled down search.As of 6.1GA2, I don't see any possible solution which can be developed by using a jsp hook. We can't use multiple facets on the same term, and current implementation has BooleanClauseOccur.SHOULD hardcoded. MultiValueFacet (btw thanks for explaining its name) does handle multiple terms, so why you say that ain't the right place to edit the query?Look at @Himanshu case as example:- requirement: filter search with multiple terms on the same element- terms:topic2,COUNTRY- current implementation produces (assetCategoryNames:topic2 assetCategoryNames:COUNTRY): result is OR between these clauses- my proposal http://issues.liferay.com/browse/LPS-28228: let admin decide facet clauseexample result with (AND -BooleanClauseOccur.MUST ) -> (assetCategoryNames:topic2 AND assetCategoryNames:COUNTRY)I don't want to use a single facet to search on multiple fields, instead I need the option to produce and AND booleanQuery.I'm already using this approach on a couple of projects, because of deadlines, but I'm more than open to suggestions on a better way to implement this. Your explanations are really valuable.Thanks for your response, and sorry for my English..Matteo Por favor identifíquese para votar. Contestar como... Cancelar
Kim A Kunc Ray Augé Hace 11 años Ray, thanks for your reply!What would think of a new feature in the service builder definition that would automatically create these audit fields i.e. a new property "auditedModel=true/false" ? Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Kim A Kunc Hace 11 años That would be cool (JIRA feature request?). Por favor identifíquese para votar. Contestar como... Cancelar Denis Signoretto Ray Augé Hace 11 años Hi Ray,A really useful article. Can you tell me if the same functionalities are available through web services or JSON requests (via portal-client.jar) ?Thanks,Denis. Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Denis Signoretto Hace 11 años Unfortunately not at the moment (JIRA feature request?). Por favor identifíquese para votar. Contestar como... Cancelar Matteo S Ray Augé Hace 11 años Hi Ray,I do understand your point about facet's design. However, as others have pointed out, there's a strong use case regarding drilled down search.As of 6.1GA2, I don't see any possible solution which can be developed by using a jsp hook. We can't use multiple facets on the same term, and current implementation has BooleanClauseOccur.SHOULD hardcoded. MultiValueFacet (btw thanks for explaining its name) does handle multiple terms, so why you say that ain't the right place to edit the query?Look at @Himanshu case as example:- requirement: filter search with multiple terms on the same element- terms:topic2,COUNTRY- current implementation produces (assetCategoryNames:topic2 assetCategoryNames:COUNTRY): result is OR between these clauses- my proposal http://issues.liferay.com/browse/LPS-28228: let admin decide facet clauseexample result with (AND -BooleanClauseOccur.MUST ) -> (assetCategoryNames:topic2 AND assetCategoryNames:COUNTRY)I don't want to use a single facet to search on multiple fields, instead I need the option to produce and AND booleanQuery.I'm already using this approach on a couple of projects, because of deadlines, but I'm more than open to suggestions on a better way to implement this. Your explanations are really valuable.Thanks for your response, and sorry for my English..Matteo Por favor identifíquese para votar. Contestar como... Cancelar
Ray Augé Kim A Kunc Hace 11 años That would be cool (JIRA feature request?). Por favor identifíquese para votar. Contestar como... Cancelar Denis Signoretto Ray Augé Hace 11 años Hi Ray,A really useful article. Can you tell me if the same functionalities are available through web services or JSON requests (via portal-client.jar) ?Thanks,Denis. Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Denis Signoretto Hace 11 años Unfortunately not at the moment (JIRA feature request?). Por favor identifíquese para votar. Contestar como... Cancelar Matteo S Ray Augé Hace 11 años Hi Ray,I do understand your point about facet's design. However, as others have pointed out, there's a strong use case regarding drilled down search.As of 6.1GA2, I don't see any possible solution which can be developed by using a jsp hook. We can't use multiple facets on the same term, and current implementation has BooleanClauseOccur.SHOULD hardcoded. MultiValueFacet (btw thanks for explaining its name) does handle multiple terms, so why you say that ain't the right place to edit the query?Look at @Himanshu case as example:- requirement: filter search with multiple terms on the same element- terms:topic2,COUNTRY- current implementation produces (assetCategoryNames:topic2 assetCategoryNames:COUNTRY): result is OR between these clauses- my proposal http://issues.liferay.com/browse/LPS-28228: let admin decide facet clauseexample result with (AND -BooleanClauseOccur.MUST ) -> (assetCategoryNames:topic2 AND assetCategoryNames:COUNTRY)I don't want to use a single facet to search on multiple fields, instead I need the option to produce and AND booleanQuery.I'm already using this approach on a couple of projects, because of deadlines, but I'm more than open to suggestions on a better way to implement this. Your explanations are really valuable.Thanks for your response, and sorry for my English..Matteo Por favor identifíquese para votar. Contestar como... Cancelar
Denis Signoretto Ray Augé Hace 11 años Hi Ray,A really useful article. Can you tell me if the same functionalities are available through web services or JSON requests (via portal-client.jar) ?Thanks,Denis. Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Denis Signoretto Hace 11 años Unfortunately not at the moment (JIRA feature request?). Por favor identifíquese para votar. Contestar como... Cancelar Matteo S Ray Augé Hace 11 años Hi Ray,I do understand your point about facet's design. However, as others have pointed out, there's a strong use case regarding drilled down search.As of 6.1GA2, I don't see any possible solution which can be developed by using a jsp hook. We can't use multiple facets on the same term, and current implementation has BooleanClauseOccur.SHOULD hardcoded. MultiValueFacet (btw thanks for explaining its name) does handle multiple terms, so why you say that ain't the right place to edit the query?Look at @Himanshu case as example:- requirement: filter search with multiple terms on the same element- terms:topic2,COUNTRY- current implementation produces (assetCategoryNames:topic2 assetCategoryNames:COUNTRY): result is OR between these clauses- my proposal http://issues.liferay.com/browse/LPS-28228: let admin decide facet clauseexample result with (AND -BooleanClauseOccur.MUST ) -> (assetCategoryNames:topic2 AND assetCategoryNames:COUNTRY)I don't want to use a single facet to search on multiple fields, instead I need the option to produce and AND booleanQuery.I'm already using this approach on a couple of projects, because of deadlines, but I'm more than open to suggestions on a better way to implement this. Your explanations are really valuable.Thanks for your response, and sorry for my English..Matteo Por favor identifíquese para votar. Contestar como... Cancelar
Ray Augé Denis Signoretto Hace 11 años Unfortunately not at the moment (JIRA feature request?). Por favor identifíquese para votar. Contestar como... Cancelar Matteo S Ray Augé Hace 11 años Hi Ray,I do understand your point about facet's design. However, as others have pointed out, there's a strong use case regarding drilled down search.As of 6.1GA2, I don't see any possible solution which can be developed by using a jsp hook. We can't use multiple facets on the same term, and current implementation has BooleanClauseOccur.SHOULD hardcoded. MultiValueFacet (btw thanks for explaining its name) does handle multiple terms, so why you say that ain't the right place to edit the query?Look at @Himanshu case as example:- requirement: filter search with multiple terms on the same element- terms:topic2,COUNTRY- current implementation produces (assetCategoryNames:topic2 assetCategoryNames:COUNTRY): result is OR between these clauses- my proposal http://issues.liferay.com/browse/LPS-28228: let admin decide facet clauseexample result with (AND -BooleanClauseOccur.MUST ) -> (assetCategoryNames:topic2 AND assetCategoryNames:COUNTRY)I don't want to use a single facet to search on multiple fields, instead I need the option to produce and AND booleanQuery.I'm already using this approach on a couple of projects, because of deadlines, but I'm more than open to suggestions on a better way to implement this. Your explanations are really valuable.Thanks for your response, and sorry for my English..Matteo Por favor identifíquese para votar. Contestar como... Cancelar
Matteo S Ray Augé Hace 11 años Hi Ray,I do understand your point about facet's design. However, as others have pointed out, there's a strong use case regarding drilled down search.As of 6.1GA2, I don't see any possible solution which can be developed by using a jsp hook. We can't use multiple facets on the same term, and current implementation has BooleanClauseOccur.SHOULD hardcoded. MultiValueFacet (btw thanks for explaining its name) does handle multiple terms, so why you say that ain't the right place to edit the query?Look at @Himanshu case as example:- requirement: filter search with multiple terms on the same element- terms:topic2,COUNTRY- current implementation produces (assetCategoryNames:topic2 assetCategoryNames:COUNTRY): result is OR between these clauses- my proposal http://issues.liferay.com/browse/LPS-28228: let admin decide facet clauseexample result with (AND -BooleanClauseOccur.MUST ) -> (assetCategoryNames:topic2 AND assetCategoryNames:COUNTRY)I don't want to use a single facet to search on multiple fields, instead I need the option to produce and AND booleanQuery.I'm already using this approach on a couple of projects, because of deadlines, but I'm more than open to suggestions on a better way to implement this. Your explanations are really valuable.Thanks for your response, and sorry for my English..Matteo Por favor identifíquese para votar. Contestar como... Cancelar
Gwowen Fu Hace 11 años Thanks for this detailed blog about Faceted Search API.I am having an issue. The search is returning articles with old articleID.I have a portlet to add articles with articleID set to article title, later I change the portlet to delete all articles and add articles with articleID generated by Liferay.Problem happened, the data returned is the old article created before. The article is still using title as articleID instead of system generated ID.I tried to clear cache from Server Administration and tried to restart server several times and still the Faceted Search API returns old article. I checked the database and it is not there.Where is the data cached? Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Gwowen Fu Hace 11 años The data is not cached so much as it may be that the indexes are out of sync with the real data (in the D. Try reindexing the search engines (you can do that all at once via the Admin portlet, or individually by portlet through the plugins configurations portlet). Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Ray Augé Hace 11 años @Matteo, As I stated previously, you can use the searchContext.setBooleanClauses(BooleanClause[] clauses) method to add more filtering. Such clauses can implement whatever complex logic you wish to add without causing the facet collector to process for that data (which if all you want to do is filter, is really the wrong mechanism). Por favor identifíquese para votar. Contestar como... Cancelar Yogesh Sharma Ray Augé Hace 11 años Hi Ray, Thank you for very informative and helpful blog.I would like to add something more in detail here:We sometime keep data in web content structure fields, and custom fields. Following are naming pattern of these fields:Structure fields can be referred as:"web_content/structure-field-name"Here structure-field-name name of field in webcontent structure.Custom fields can be referred as:"expando/custom_fields/custom_field_key"Here custom_field_key is key of custom field for entity.These can be used in facet configuration with additional display style (via hook). Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Yogesh Sharma Hace 11 años - Editado @Yogesh, that is correct! Thanks for pointing that out. We wanted to make sure any field in the index was accessible for facet collection, including custom fields, including document type fields which will be encoded a little differently as "ddm/<ddmStructureId>/<fieldName>". Sadly, it's true that the use of <ddmStructureId> is not ideal and there has already been discussion to perhaps provide an alternative that is more "usable" in future versions. Por favor identifíquese para votar. Contestar como... Cancelar Bart Simpson Ray Augé Hace 11 años Hi Ray,Is there a way to exclude certain fields? Here it only gives option to specify fields and values that are to be searched. What about the scenario : search all the facets except for one facet. Or search all except fieldX with valueY? I suppose this is only possible for now with PostProcessorHook? Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Bart Simpson Hace 11 años A facet by it's very nature can only search one field.. so I'm not clear on that question.It's also possible to apply an array of QueryClauses on the SearchContext to filter the reqults. This is how I would implement the: "Or search all except fieldX with valueY?" req. But that would require a hook at the moment. Por favor identifíquese para votar. Contestar como... Cancelar Jonas Yuan Ray Augé Hace 11 años Hi Ray, Thank you for very informative blog. Question:suppose that there are two categories / tags with same name in Global group and current group; how could we distinguish them in facets by names? is it better to use category ID / tag ID? Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Jonas Yuan Hace 11 años Jonas, categoryId is better in this case. Por favor identifíquese para votar. Contestar como... Cancelar Matteo Galletti Ray Augé Hace 11 años Hi Ray, I'm new to Liferayin my custom theme I put search portlet at runtime with the following code: $velocityPortletPreferences.setValue("portlet-setup-show-borders","false") $velocityPortletPreferences.setValue("advancedConfiguration","true") $velocityPortletPreferences.setValue("searchConfiguration","'facets':[{'displayStyle':'asset_entries','weight':1.5,'s[......]") $theme.runtime("3_INSTANCE_kw01","",$velocityPortletPreferences.toString()) $velocityPortletPreferences.reset() where in "searchConfiguration", I insert a new line to make sure that the portlet can search a custom entity .But when in the portal I push the search command, these configurations are not observed. Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Matteo Galletti Hace 11 años Ok, I think I see the problem. First, the search portlet is not instanceable, which means you can remove the "_INSTANCE_kw01" portion of the portletId. Secondly, because the portlet is not instanceable, you have to use a different technique to set it's preferences. See this gist https://gist.github.com/4287391 (there are actually 2 different preferences, the preferences, and the setup). ;) Por favor identifíquese para votar. Contestar como... Cancelar Saurabh Gupta Ray Augé Hace 11 años Hi Ray, This info. is really good. i have some requirement but i don't know how to do this. My requirement is "suppose with search portlet there is 3 radio button 1st company tag, 2nd is for message board and 3rd for site. after selecting any radio button where and which value i need set or what code modification i need to do." Thank you in Advance Por favor identifíquese para votar. Contestar como... Cancelar Mike Ring Ray Augé Hace 11 años Ray,Is putting the default search configuration in a custom theme (in the link you posted the portal_normal.vm file) the preferred way to change the default search configuration for all search portlets? I couldn't get it to work and was wondering if there's a better way. I'm also trying to add a custom entity to the advanced search configuration for all search portlets in my app.Thanks. Por favor identifíquese para votar. Contestar como... Cancelar
Ray Augé Gwowen Fu Hace 11 años The data is not cached so much as it may be that the indexes are out of sync with the real data (in the D. Try reindexing the search engines (you can do that all at once via the Admin portlet, or individually by portlet through the plugins configurations portlet). Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Ray Augé Hace 11 años @Matteo, As I stated previously, you can use the searchContext.setBooleanClauses(BooleanClause[] clauses) method to add more filtering. Such clauses can implement whatever complex logic you wish to add without causing the facet collector to process for that data (which if all you want to do is filter, is really the wrong mechanism). Por favor identifíquese para votar. Contestar como... Cancelar Yogesh Sharma Ray Augé Hace 11 años Hi Ray, Thank you for very informative and helpful blog.I would like to add something more in detail here:We sometime keep data in web content structure fields, and custom fields. Following are naming pattern of these fields:Structure fields can be referred as:"web_content/structure-field-name"Here structure-field-name name of field in webcontent structure.Custom fields can be referred as:"expando/custom_fields/custom_field_key"Here custom_field_key is key of custom field for entity.These can be used in facet configuration with additional display style (via hook). Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Yogesh Sharma Hace 11 años - Editado @Yogesh, that is correct! Thanks for pointing that out. We wanted to make sure any field in the index was accessible for facet collection, including custom fields, including document type fields which will be encoded a little differently as "ddm/<ddmStructureId>/<fieldName>". Sadly, it's true that the use of <ddmStructureId> is not ideal and there has already been discussion to perhaps provide an alternative that is more "usable" in future versions. Por favor identifíquese para votar. Contestar como... Cancelar Bart Simpson Ray Augé Hace 11 años Hi Ray,Is there a way to exclude certain fields? Here it only gives option to specify fields and values that are to be searched. What about the scenario : search all the facets except for one facet. Or search all except fieldX with valueY? I suppose this is only possible for now with PostProcessorHook? Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Bart Simpson Hace 11 años A facet by it's very nature can only search one field.. so I'm not clear on that question.It's also possible to apply an array of QueryClauses on the SearchContext to filter the reqults. This is how I would implement the: "Or search all except fieldX with valueY?" req. But that would require a hook at the moment. Por favor identifíquese para votar. Contestar como... Cancelar Jonas Yuan Ray Augé Hace 11 años Hi Ray, Thank you for very informative blog. Question:suppose that there are two categories / tags with same name in Global group and current group; how could we distinguish them in facets by names? is it better to use category ID / tag ID? Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Jonas Yuan Hace 11 años Jonas, categoryId is better in this case. Por favor identifíquese para votar. Contestar como... Cancelar Matteo Galletti Ray Augé Hace 11 años Hi Ray, I'm new to Liferayin my custom theme I put search portlet at runtime with the following code: $velocityPortletPreferences.setValue("portlet-setup-show-borders","false") $velocityPortletPreferences.setValue("advancedConfiguration","true") $velocityPortletPreferences.setValue("searchConfiguration","'facets':[{'displayStyle':'asset_entries','weight':1.5,'s[......]") $theme.runtime("3_INSTANCE_kw01","",$velocityPortletPreferences.toString()) $velocityPortletPreferences.reset() where in "searchConfiguration", I insert a new line to make sure that the portlet can search a custom entity .But when in the portal I push the search command, these configurations are not observed. Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Matteo Galletti Hace 11 años Ok, I think I see the problem. First, the search portlet is not instanceable, which means you can remove the "_INSTANCE_kw01" portion of the portletId. Secondly, because the portlet is not instanceable, you have to use a different technique to set it's preferences. See this gist https://gist.github.com/4287391 (there are actually 2 different preferences, the preferences, and the setup). ;) Por favor identifíquese para votar. Contestar como... Cancelar Saurabh Gupta Ray Augé Hace 11 años Hi Ray, This info. is really good. i have some requirement but i don't know how to do this. My requirement is "suppose with search portlet there is 3 radio button 1st company tag, 2nd is for message board and 3rd for site. after selecting any radio button where and which value i need set or what code modification i need to do." Thank you in Advance Por favor identifíquese para votar. Contestar como... Cancelar Mike Ring Ray Augé Hace 11 años Ray,Is putting the default search configuration in a custom theme (in the link you posted the portal_normal.vm file) the preferred way to change the default search configuration for all search portlets? I couldn't get it to work and was wondering if there's a better way. I'm also trying to add a custom entity to the advanced search configuration for all search portlets in my app.Thanks. Por favor identifíquese para votar. Contestar como... Cancelar
Ray Augé Ray Augé Hace 11 años @Matteo, As I stated previously, you can use the searchContext.setBooleanClauses(BooleanClause[] clauses) method to add more filtering. Such clauses can implement whatever complex logic you wish to add without causing the facet collector to process for that data (which if all you want to do is filter, is really the wrong mechanism). Por favor identifíquese para votar. Contestar como... Cancelar Yogesh Sharma Ray Augé Hace 11 años Hi Ray, Thank you for very informative and helpful blog.I would like to add something more in detail here:We sometime keep data in web content structure fields, and custom fields. Following are naming pattern of these fields:Structure fields can be referred as:"web_content/structure-field-name"Here structure-field-name name of field in webcontent structure.Custom fields can be referred as:"expando/custom_fields/custom_field_key"Here custom_field_key is key of custom field for entity.These can be used in facet configuration with additional display style (via hook). Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Yogesh Sharma Hace 11 años - Editado @Yogesh, that is correct! Thanks for pointing that out. We wanted to make sure any field in the index was accessible for facet collection, including custom fields, including document type fields which will be encoded a little differently as "ddm/<ddmStructureId>/<fieldName>". Sadly, it's true that the use of <ddmStructureId> is not ideal and there has already been discussion to perhaps provide an alternative that is more "usable" in future versions. Por favor identifíquese para votar. Contestar como... Cancelar Bart Simpson Ray Augé Hace 11 años Hi Ray,Is there a way to exclude certain fields? Here it only gives option to specify fields and values that are to be searched. What about the scenario : search all the facets except for one facet. Or search all except fieldX with valueY? I suppose this is only possible for now with PostProcessorHook? Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Bart Simpson Hace 11 años A facet by it's very nature can only search one field.. so I'm not clear on that question.It's also possible to apply an array of QueryClauses on the SearchContext to filter the reqults. This is how I would implement the: "Or search all except fieldX with valueY?" req. But that would require a hook at the moment. Por favor identifíquese para votar. Contestar como... Cancelar Jonas Yuan Ray Augé Hace 11 años Hi Ray, Thank you for very informative blog. Question:suppose that there are two categories / tags with same name in Global group and current group; how could we distinguish them in facets by names? is it better to use category ID / tag ID? Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Jonas Yuan Hace 11 años Jonas, categoryId is better in this case. Por favor identifíquese para votar. Contestar como... Cancelar Matteo Galletti Ray Augé Hace 11 años Hi Ray, I'm new to Liferayin my custom theme I put search portlet at runtime with the following code: $velocityPortletPreferences.setValue("portlet-setup-show-borders","false") $velocityPortletPreferences.setValue("advancedConfiguration","true") $velocityPortletPreferences.setValue("searchConfiguration","'facets':[{'displayStyle':'asset_entries','weight':1.5,'s[......]") $theme.runtime("3_INSTANCE_kw01","",$velocityPortletPreferences.toString()) $velocityPortletPreferences.reset() where in "searchConfiguration", I insert a new line to make sure that the portlet can search a custom entity .But when in the portal I push the search command, these configurations are not observed. Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Matteo Galletti Hace 11 años Ok, I think I see the problem. First, the search portlet is not instanceable, which means you can remove the "_INSTANCE_kw01" portion of the portletId. Secondly, because the portlet is not instanceable, you have to use a different technique to set it's preferences. See this gist https://gist.github.com/4287391 (there are actually 2 different preferences, the preferences, and the setup). ;) Por favor identifíquese para votar. Contestar como... Cancelar Saurabh Gupta Ray Augé Hace 11 años Hi Ray, This info. is really good. i have some requirement but i don't know how to do this. My requirement is "suppose with search portlet there is 3 radio button 1st company tag, 2nd is for message board and 3rd for site. after selecting any radio button where and which value i need set or what code modification i need to do." Thank you in Advance Por favor identifíquese para votar. Contestar como... Cancelar Mike Ring Ray Augé Hace 11 años Ray,Is putting the default search configuration in a custom theme (in the link you posted the portal_normal.vm file) the preferred way to change the default search configuration for all search portlets? I couldn't get it to work and was wondering if there's a better way. I'm also trying to add a custom entity to the advanced search configuration for all search portlets in my app.Thanks. Por favor identifíquese para votar. Contestar como... Cancelar
Yogesh Sharma Ray Augé Hace 11 años Hi Ray, Thank you for very informative and helpful blog.I would like to add something more in detail here:We sometime keep data in web content structure fields, and custom fields. Following are naming pattern of these fields:Structure fields can be referred as:"web_content/structure-field-name"Here structure-field-name name of field in webcontent structure.Custom fields can be referred as:"expando/custom_fields/custom_field_key"Here custom_field_key is key of custom field for entity.These can be used in facet configuration with additional display style (via hook). Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Yogesh Sharma Hace 11 años - Editado @Yogesh, that is correct! Thanks for pointing that out. We wanted to make sure any field in the index was accessible for facet collection, including custom fields, including document type fields which will be encoded a little differently as "ddm/<ddmStructureId>/<fieldName>". Sadly, it's true that the use of <ddmStructureId> is not ideal and there has already been discussion to perhaps provide an alternative that is more "usable" in future versions. Por favor identifíquese para votar. Contestar como... Cancelar Bart Simpson Ray Augé Hace 11 años Hi Ray,Is there a way to exclude certain fields? Here it only gives option to specify fields and values that are to be searched. What about the scenario : search all the facets except for one facet. Or search all except fieldX with valueY? I suppose this is only possible for now with PostProcessorHook? Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Bart Simpson Hace 11 años A facet by it's very nature can only search one field.. so I'm not clear on that question.It's also possible to apply an array of QueryClauses on the SearchContext to filter the reqults. This is how I would implement the: "Or search all except fieldX with valueY?" req. But that would require a hook at the moment. Por favor identifíquese para votar. Contestar como... Cancelar Jonas Yuan Ray Augé Hace 11 años Hi Ray, Thank you for very informative blog. Question:suppose that there are two categories / tags with same name in Global group and current group; how could we distinguish them in facets by names? is it better to use category ID / tag ID? Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Jonas Yuan Hace 11 años Jonas, categoryId is better in this case. Por favor identifíquese para votar. Contestar como... Cancelar Matteo Galletti Ray Augé Hace 11 años Hi Ray, I'm new to Liferayin my custom theme I put search portlet at runtime with the following code: $velocityPortletPreferences.setValue("portlet-setup-show-borders","false") $velocityPortletPreferences.setValue("advancedConfiguration","true") $velocityPortletPreferences.setValue("searchConfiguration","'facets':[{'displayStyle':'asset_entries','weight':1.5,'s[......]") $theme.runtime("3_INSTANCE_kw01","",$velocityPortletPreferences.toString()) $velocityPortletPreferences.reset() where in "searchConfiguration", I insert a new line to make sure that the portlet can search a custom entity .But when in the portal I push the search command, these configurations are not observed. Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Matteo Galletti Hace 11 años Ok, I think I see the problem. First, the search portlet is not instanceable, which means you can remove the "_INSTANCE_kw01" portion of the portletId. Secondly, because the portlet is not instanceable, you have to use a different technique to set it's preferences. See this gist https://gist.github.com/4287391 (there are actually 2 different preferences, the preferences, and the setup). ;) Por favor identifíquese para votar. Contestar como... Cancelar Saurabh Gupta Ray Augé Hace 11 años Hi Ray, This info. is really good. i have some requirement but i don't know how to do this. My requirement is "suppose with search portlet there is 3 radio button 1st company tag, 2nd is for message board and 3rd for site. after selecting any radio button where and which value i need set or what code modification i need to do." Thank you in Advance Por favor identifíquese para votar. Contestar como... Cancelar Mike Ring Ray Augé Hace 11 años Ray,Is putting the default search configuration in a custom theme (in the link you posted the portal_normal.vm file) the preferred way to change the default search configuration for all search portlets? I couldn't get it to work and was wondering if there's a better way. I'm also trying to add a custom entity to the advanced search configuration for all search portlets in my app.Thanks. Por favor identifíquese para votar. Contestar como... Cancelar
Ray Augé Yogesh Sharma Hace 11 años - Editado @Yogesh, that is correct! Thanks for pointing that out. We wanted to make sure any field in the index was accessible for facet collection, including custom fields, including document type fields which will be encoded a little differently as "ddm/<ddmStructureId>/<fieldName>". Sadly, it's true that the use of <ddmStructureId> is not ideal and there has already been discussion to perhaps provide an alternative that is more "usable" in future versions. Por favor identifíquese para votar. Contestar como... Cancelar Bart Simpson Ray Augé Hace 11 años Hi Ray,Is there a way to exclude certain fields? Here it only gives option to specify fields and values that are to be searched. What about the scenario : search all the facets except for one facet. Or search all except fieldX with valueY? I suppose this is only possible for now with PostProcessorHook? Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Bart Simpson Hace 11 años A facet by it's very nature can only search one field.. so I'm not clear on that question.It's also possible to apply an array of QueryClauses on the SearchContext to filter the reqults. This is how I would implement the: "Or search all except fieldX with valueY?" req. But that would require a hook at the moment. Por favor identifíquese para votar. Contestar como... Cancelar Jonas Yuan Ray Augé Hace 11 años Hi Ray, Thank you for very informative blog. Question:suppose that there are two categories / tags with same name in Global group and current group; how could we distinguish them in facets by names? is it better to use category ID / tag ID? Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Jonas Yuan Hace 11 años Jonas, categoryId is better in this case. Por favor identifíquese para votar. Contestar como... Cancelar Matteo Galletti Ray Augé Hace 11 años Hi Ray, I'm new to Liferayin my custom theme I put search portlet at runtime with the following code: $velocityPortletPreferences.setValue("portlet-setup-show-borders","false") $velocityPortletPreferences.setValue("advancedConfiguration","true") $velocityPortletPreferences.setValue("searchConfiguration","'facets':[{'displayStyle':'asset_entries','weight':1.5,'s[......]") $theme.runtime("3_INSTANCE_kw01","",$velocityPortletPreferences.toString()) $velocityPortletPreferences.reset() where in "searchConfiguration", I insert a new line to make sure that the portlet can search a custom entity .But when in the portal I push the search command, these configurations are not observed. Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Matteo Galletti Hace 11 años Ok, I think I see the problem. First, the search portlet is not instanceable, which means you can remove the "_INSTANCE_kw01" portion of the portletId. Secondly, because the portlet is not instanceable, you have to use a different technique to set it's preferences. See this gist https://gist.github.com/4287391 (there are actually 2 different preferences, the preferences, and the setup). ;) Por favor identifíquese para votar. Contestar como... Cancelar Saurabh Gupta Ray Augé Hace 11 años Hi Ray, This info. is really good. i have some requirement but i don't know how to do this. My requirement is "suppose with search portlet there is 3 radio button 1st company tag, 2nd is for message board and 3rd for site. after selecting any radio button where and which value i need set or what code modification i need to do." Thank you in Advance Por favor identifíquese para votar. Contestar como... Cancelar Mike Ring Ray Augé Hace 11 años Ray,Is putting the default search configuration in a custom theme (in the link you posted the portal_normal.vm file) the preferred way to change the default search configuration for all search portlets? I couldn't get it to work and was wondering if there's a better way. I'm also trying to add a custom entity to the advanced search configuration for all search portlets in my app.Thanks. Por favor identifíquese para votar. Contestar como... Cancelar
Bart Simpson Ray Augé Hace 11 años Hi Ray,Is there a way to exclude certain fields? Here it only gives option to specify fields and values that are to be searched. What about the scenario : search all the facets except for one facet. Or search all except fieldX with valueY? I suppose this is only possible for now with PostProcessorHook? Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Bart Simpson Hace 11 años A facet by it's very nature can only search one field.. so I'm not clear on that question.It's also possible to apply an array of QueryClauses on the SearchContext to filter the reqults. This is how I would implement the: "Or search all except fieldX with valueY?" req. But that would require a hook at the moment. Por favor identifíquese para votar. Contestar como... Cancelar Jonas Yuan Ray Augé Hace 11 años Hi Ray, Thank you for very informative blog. Question:suppose that there are two categories / tags with same name in Global group and current group; how could we distinguish them in facets by names? is it better to use category ID / tag ID? Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Jonas Yuan Hace 11 años Jonas, categoryId is better in this case. Por favor identifíquese para votar. Contestar como... Cancelar Matteo Galletti Ray Augé Hace 11 años Hi Ray, I'm new to Liferayin my custom theme I put search portlet at runtime with the following code: $velocityPortletPreferences.setValue("portlet-setup-show-borders","false") $velocityPortletPreferences.setValue("advancedConfiguration","true") $velocityPortletPreferences.setValue("searchConfiguration","'facets':[{'displayStyle':'asset_entries','weight':1.5,'s[......]") $theme.runtime("3_INSTANCE_kw01","",$velocityPortletPreferences.toString()) $velocityPortletPreferences.reset() where in "searchConfiguration", I insert a new line to make sure that the portlet can search a custom entity .But when in the portal I push the search command, these configurations are not observed. Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Matteo Galletti Hace 11 años Ok, I think I see the problem. First, the search portlet is not instanceable, which means you can remove the "_INSTANCE_kw01" portion of the portletId. Secondly, because the portlet is not instanceable, you have to use a different technique to set it's preferences. See this gist https://gist.github.com/4287391 (there are actually 2 different preferences, the preferences, and the setup). ;) Por favor identifíquese para votar. Contestar como... Cancelar Saurabh Gupta Ray Augé Hace 11 años Hi Ray, This info. is really good. i have some requirement but i don't know how to do this. My requirement is "suppose with search portlet there is 3 radio button 1st company tag, 2nd is for message board and 3rd for site. after selecting any radio button where and which value i need set or what code modification i need to do." Thank you in Advance Por favor identifíquese para votar. Contestar como... Cancelar Mike Ring Ray Augé Hace 11 años Ray,Is putting the default search configuration in a custom theme (in the link you posted the portal_normal.vm file) the preferred way to change the default search configuration for all search portlets? I couldn't get it to work and was wondering if there's a better way. I'm also trying to add a custom entity to the advanced search configuration for all search portlets in my app.Thanks. Por favor identifíquese para votar. Contestar como... Cancelar
Ray Augé Bart Simpson Hace 11 años A facet by it's very nature can only search one field.. so I'm not clear on that question.It's also possible to apply an array of QueryClauses on the SearchContext to filter the reqults. This is how I would implement the: "Or search all except fieldX with valueY?" req. But that would require a hook at the moment. Por favor identifíquese para votar. Contestar como... Cancelar Jonas Yuan Ray Augé Hace 11 años Hi Ray, Thank you for very informative blog. Question:suppose that there are two categories / tags with same name in Global group and current group; how could we distinguish them in facets by names? is it better to use category ID / tag ID? Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Jonas Yuan Hace 11 años Jonas, categoryId is better in this case. Por favor identifíquese para votar. Contestar como... Cancelar Matteo Galletti Ray Augé Hace 11 años Hi Ray, I'm new to Liferayin my custom theme I put search portlet at runtime with the following code: $velocityPortletPreferences.setValue("portlet-setup-show-borders","false") $velocityPortletPreferences.setValue("advancedConfiguration","true") $velocityPortletPreferences.setValue("searchConfiguration","'facets':[{'displayStyle':'asset_entries','weight':1.5,'s[......]") $theme.runtime("3_INSTANCE_kw01","",$velocityPortletPreferences.toString()) $velocityPortletPreferences.reset() where in "searchConfiguration", I insert a new line to make sure that the portlet can search a custom entity .But when in the portal I push the search command, these configurations are not observed. Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Matteo Galletti Hace 11 años Ok, I think I see the problem. First, the search portlet is not instanceable, which means you can remove the "_INSTANCE_kw01" portion of the portletId. Secondly, because the portlet is not instanceable, you have to use a different technique to set it's preferences. See this gist https://gist.github.com/4287391 (there are actually 2 different preferences, the preferences, and the setup). ;) Por favor identifíquese para votar. Contestar como... Cancelar Saurabh Gupta Ray Augé Hace 11 años Hi Ray, This info. is really good. i have some requirement but i don't know how to do this. My requirement is "suppose with search portlet there is 3 radio button 1st company tag, 2nd is for message board and 3rd for site. after selecting any radio button where and which value i need set or what code modification i need to do." Thank you in Advance Por favor identifíquese para votar. Contestar como... Cancelar Mike Ring Ray Augé Hace 11 años Ray,Is putting the default search configuration in a custom theme (in the link you posted the portal_normal.vm file) the preferred way to change the default search configuration for all search portlets? I couldn't get it to work and was wondering if there's a better way. I'm also trying to add a custom entity to the advanced search configuration for all search portlets in my app.Thanks. Por favor identifíquese para votar. Contestar como... Cancelar
Jonas Yuan Ray Augé Hace 11 años Hi Ray, Thank you for very informative blog. Question:suppose that there are two categories / tags with same name in Global group and current group; how could we distinguish them in facets by names? is it better to use category ID / tag ID? Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Jonas Yuan Hace 11 años Jonas, categoryId is better in this case. Por favor identifíquese para votar. Contestar como... Cancelar Matteo Galletti Ray Augé Hace 11 años Hi Ray, I'm new to Liferayin my custom theme I put search portlet at runtime with the following code: $velocityPortletPreferences.setValue("portlet-setup-show-borders","false") $velocityPortletPreferences.setValue("advancedConfiguration","true") $velocityPortletPreferences.setValue("searchConfiguration","'facets':[{'displayStyle':'asset_entries','weight':1.5,'s[......]") $theme.runtime("3_INSTANCE_kw01","",$velocityPortletPreferences.toString()) $velocityPortletPreferences.reset() where in "searchConfiguration", I insert a new line to make sure that the portlet can search a custom entity .But when in the portal I push the search command, these configurations are not observed. Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Matteo Galletti Hace 11 años Ok, I think I see the problem. First, the search portlet is not instanceable, which means you can remove the "_INSTANCE_kw01" portion of the portletId. Secondly, because the portlet is not instanceable, you have to use a different technique to set it's preferences. See this gist https://gist.github.com/4287391 (there are actually 2 different preferences, the preferences, and the setup). ;) Por favor identifíquese para votar. Contestar como... Cancelar Saurabh Gupta Ray Augé Hace 11 años Hi Ray, This info. is really good. i have some requirement but i don't know how to do this. My requirement is "suppose with search portlet there is 3 radio button 1st company tag, 2nd is for message board and 3rd for site. after selecting any radio button where and which value i need set or what code modification i need to do." Thank you in Advance Por favor identifíquese para votar. Contestar como... Cancelar Mike Ring Ray Augé Hace 11 años Ray,Is putting the default search configuration in a custom theme (in the link you posted the portal_normal.vm file) the preferred way to change the default search configuration for all search portlets? I couldn't get it to work and was wondering if there's a better way. I'm also trying to add a custom entity to the advanced search configuration for all search portlets in my app.Thanks. Por favor identifíquese para votar. Contestar como... Cancelar
Ray Augé Jonas Yuan Hace 11 años Jonas, categoryId is better in this case. Por favor identifíquese para votar. Contestar como... Cancelar Matteo Galletti Ray Augé Hace 11 años Hi Ray, I'm new to Liferayin my custom theme I put search portlet at runtime with the following code: $velocityPortletPreferences.setValue("portlet-setup-show-borders","false") $velocityPortletPreferences.setValue("advancedConfiguration","true") $velocityPortletPreferences.setValue("searchConfiguration","'facets':[{'displayStyle':'asset_entries','weight':1.5,'s[......]") $theme.runtime("3_INSTANCE_kw01","",$velocityPortletPreferences.toString()) $velocityPortletPreferences.reset() where in "searchConfiguration", I insert a new line to make sure that the portlet can search a custom entity .But when in the portal I push the search command, these configurations are not observed. Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Matteo Galletti Hace 11 años Ok, I think I see the problem. First, the search portlet is not instanceable, which means you can remove the "_INSTANCE_kw01" portion of the portletId. Secondly, because the portlet is not instanceable, you have to use a different technique to set it's preferences. See this gist https://gist.github.com/4287391 (there are actually 2 different preferences, the preferences, and the setup). ;) Por favor identifíquese para votar. Contestar como... Cancelar Saurabh Gupta Ray Augé Hace 11 años Hi Ray, This info. is really good. i have some requirement but i don't know how to do this. My requirement is "suppose with search portlet there is 3 radio button 1st company tag, 2nd is for message board and 3rd for site. after selecting any radio button where and which value i need set or what code modification i need to do." Thank you in Advance Por favor identifíquese para votar. Contestar como... Cancelar Mike Ring Ray Augé Hace 11 años Ray,Is putting the default search configuration in a custom theme (in the link you posted the portal_normal.vm file) the preferred way to change the default search configuration for all search portlets? I couldn't get it to work and was wondering if there's a better way. I'm also trying to add a custom entity to the advanced search configuration for all search portlets in my app.Thanks. Por favor identifíquese para votar. Contestar como... Cancelar
Matteo Galletti Ray Augé Hace 11 años Hi Ray, I'm new to Liferayin my custom theme I put search portlet at runtime with the following code: $velocityPortletPreferences.setValue("portlet-setup-show-borders","false") $velocityPortletPreferences.setValue("advancedConfiguration","true") $velocityPortletPreferences.setValue("searchConfiguration","'facets':[{'displayStyle':'asset_entries','weight':1.5,'s[......]") $theme.runtime("3_INSTANCE_kw01","",$velocityPortletPreferences.toString()) $velocityPortletPreferences.reset() where in "searchConfiguration", I insert a new line to make sure that the portlet can search a custom entity .But when in the portal I push the search command, these configurations are not observed. Por favor identifíquese para votar. Contestar como... Cancelar Ray Augé Matteo Galletti Hace 11 años Ok, I think I see the problem. First, the search portlet is not instanceable, which means you can remove the "_INSTANCE_kw01" portion of the portletId. Secondly, because the portlet is not instanceable, you have to use a different technique to set it's preferences. See this gist https://gist.github.com/4287391 (there are actually 2 different preferences, the preferences, and the setup). ;) Por favor identifíquese para votar. Contestar como... Cancelar Saurabh Gupta Ray Augé Hace 11 años Hi Ray, This info. is really good. i have some requirement but i don't know how to do this. My requirement is "suppose with search portlet there is 3 radio button 1st company tag, 2nd is for message board and 3rd for site. after selecting any radio button where and which value i need set or what code modification i need to do." Thank you in Advance Por favor identifíquese para votar. Contestar como... Cancelar Mike Ring Ray Augé Hace 11 años Ray,Is putting the default search configuration in a custom theme (in the link you posted the portal_normal.vm file) the preferred way to change the default search configuration for all search portlets? I couldn't get it to work and was wondering if there's a better way. I'm also trying to add a custom entity to the advanced search configuration for all search portlets in my app.Thanks. Por favor identifíquese para votar. Contestar como... Cancelar
Ray Augé Matteo Galletti Hace 11 años Ok, I think I see the problem. First, the search portlet is not instanceable, which means you can remove the "_INSTANCE_kw01" portion of the portletId. Secondly, because the portlet is not instanceable, you have to use a different technique to set it's preferences. See this gist https://gist.github.com/4287391 (there are actually 2 different preferences, the preferences, and the setup). ;) Por favor identifíquese para votar. Contestar como... Cancelar Saurabh Gupta Ray Augé Hace 11 años Hi Ray, This info. is really good. i have some requirement but i don't know how to do this. My requirement is "suppose with search portlet there is 3 radio button 1st company tag, 2nd is for message board and 3rd for site. after selecting any radio button where and which value i need set or what code modification i need to do." Thank you in Advance Por favor identifíquese para votar. Contestar como... Cancelar Mike Ring Ray Augé Hace 11 años Ray,Is putting the default search configuration in a custom theme (in the link you posted the portal_normal.vm file) the preferred way to change the default search configuration for all search portlets? I couldn't get it to work and was wondering if there's a better way. I'm also trying to add a custom entity to the advanced search configuration for all search portlets in my app.Thanks. Por favor identifíquese para votar. Contestar como... Cancelar
Saurabh Gupta Ray Augé Hace 11 años Hi Ray, This info. is really good. i have some requirement but i don't know how to do this. My requirement is "suppose with search portlet there is 3 radio button 1st company tag, 2nd is for message board and 3rd for site. after selecting any radio button where and which value i need set or what code modification i need to do." Thank you in Advance Por favor identifíquese para votar. Contestar como... Cancelar
Mike Ring Ray Augé Hace 11 años Ray,Is putting the default search configuration in a custom theme (in the link you posted the portal_normal.vm file) the preferred way to change the default search configuration for all search portlets? I couldn't get it to work and was wondering if there's a better way. I'm also trying to add a custom entity to the advanced search configuration for all search portlets in my app.Thanks. Por favor identifíquese para votar. Contestar como... Cancelar