tag:blogger.com,1999:blog-7017083405558956091.post3125772449417011797..comments2023-07-05T05:50:39.922-07:00Comments on Kickin' down the cobblestones: Searchable Plugin: Just use it!Dave Kleinhttp://www.blogger.com/profile/05996044798024907436noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-7017083405558956091.post-46388675078691047752009-06-16T00:42:21.999-07:002009-06-16T00:42:21.999-07:00Thx... it works with:
params.query = params.query...Thx... it works with:<br /><br />params.query = params.query + " +finish:true +locked:false"Lissandro Dittmarhttps://www.blogger.com/profile/04442763228718054499noreply@blogger.comtag:blogger.com,1999:blog-7017083405558956091.post-5367934999773647582009-06-15T08:33:36.717-07:002009-06-15T08:33:36.717-07:00@Lissandro - I haven't tested this but a query...@Lissandro - I haven't tested this but a query string like this should work:<br /><br />+finish:true +locked:false <br /><br />Since the Searchable plugin uses Lucene under the hood, you can find more info about query strings in the lucene docs:<br />http://lucene.apache.org/java/2_4_0/queryparsersyntax.html<br /><br />Hope that helps,<br />DaveDave Kleinhttps://www.blogger.com/profile/05996044798024907436noreply@blogger.comtag:blogger.com,1999:blog-7017083405558956091.post-22834730051602793702009-06-15T00:57:46.841-07:002009-06-15T00:57:46.841-07:00Hello! I have a problem. I want to search only for...Hello! I have a problem. I want to search only for lines where the fields 'finish' are true and 'locked' are false. How can I do this? My code is:<br /><br />def search = {<br /> def helloList<br /> def c = Hello.createCriteria()<br /><br /> params.suggestQuery = true<br /><br /> if (params.query)<br /> helloList = Hello.search(params.query, params)<br /> else<br /> helloList = c.list{<br /> and{<br /> eq('locked', false)<br /> eq('finish', true)<br /> }<br /> }<br /> <br /> render(view:'list', model:[helloList : helloList.results, suggestQuery : helloList.suggestedQuery])<br /> }Lissandro Dittmarhttps://www.blogger.com/profile/04442763228718054499noreply@blogger.comtag:blogger.com,1999:blog-7017083405558956091.post-83725928693228741662008-05-15T12:41:00.000-07:002008-05-15T12:41:00.000-07:00@Gordon - No, I didn't have to use any external fi...@Gordon - No, I didn't have to use any external files.Dave Kleinhttps://www.blogger.com/profile/05996044798024907436noreply@blogger.comtag:blogger.com,1999:blog-7017083405558956091.post-38612443937679771072008-05-08T18:23:00.000-07:002008-05-08T18:23:00.000-07:00Did you have to setup a domainclass.cpm.xml file? ...Did you have to setup a domainclass.cpm.xml file? If so, can you post an example?Anonymoushttps://www.blogger.com/profile/04303877833354237882noreply@blogger.comtag:blogger.com,1999:blog-7017083405558956091.post-46320349408604802152008-04-03T10:20:00.000-07:002008-04-03T10:20:00.000-07:00I'm going go run out and try it right now!I'm going go run out and try it right now!Anonymoushttps://www.blogger.com/profile/07041739178513685832noreply@blogger.com