The desired architecture is that you use a middle app layer that clients send queries to and that middle app layer then constructs the formal query and sends it on to Solr proper. This architecture also enables breaking a user query into multiple Solr queries and then aggregating the results. Besides, the general goal is to avoid app clients talking directly to Solr anyway.
-- Jack Krupansky On Thu, Feb 4, 2016 at 2:57 AM, Derek Poh <d...@globalsources.com> wrote: > Hi Erick > > << > The manual way of doing this would be to construct an elaborate query, > like q=spp_keyword_exact:"dvd bracket" OR P_ShortDescription:(dvd bracket) > OR.... NOTE: the parens are necessary or the last part of the above would > be parsed as P_ShortDescription:dvd default_searchfield:bracket > >> > > Your suggestion to construct the query like q=spp_keyword_exact:"dvd > bracket" OR P_ShortDescription:(dvd bracket) OR does not fit into our > current implementation. > The front-end pages will only pass the "q=search keywords" in the query to > solr. The list of search fields (qf) is pre-defined in solr. > > Do you have any alternatives to implement your suggestion without making > changes to the front-end? > > On 1/29/2016 1:49 AM, Erick Erickson wrote: > >> bq: if you are interested phrase query, you should use String field >> >> If you do this, you will NOT be able to search within the string. I.e. >> if the doc field is "my dog has fleas" you cannot match >> "dog has" with a string-based field. >> >> If you want to match the _entire_ string or you want prefix-only >> matching, then string might work, i.e. if you _only_ want to be able >> to match >> >> "my dog has fleas" >> "my dog*" >> but not >> "dog has fleas". >> >> On to the root question though. >> >> I really think you want to look at edismax. What you're trying to do >> is apply the same search term to individual fields. In particular, >> the pf parameter will automatically apply the search terms _as a phrase_ >> against the field specified, relieving you of having to enclose things >> in quotes. >> >> The manual way of doing this would be to construct an elaborate query, >> like >> q=spp_keyword_exact:"dvd bracket" OR P_ShortDescription:(dvd bracket) >> OR.... >> >> NOTE: the parens are necessary or the last part of the above would be >> parsed as >> P_ShortDescription:dvd default_searchfield:bracket >> >> And the &debug=query trick will show you exactly how things are actually >> searched, it's invaluable. >> >> Best, >> Erick >> >> On Thu, Jan 28, 2016 at 5:08 AM, Mugeesh Husain <muge...@gmail.com> >> wrote: >> >>> Hi, >>> if you are interested phrase query, you should use String field instead >>> of >>> text field in schema like as >>> <field name="Field_name" type="string" indexed="true" stored="true"/> >>> >>> this will solved you problem. >>> >>> if you are missing anything else let share >>> >>> >>> >>> -- >>> View this message in context: >>> http://lucene.472066.n3.nabble.com/implement-exact-match-for-one-of-the-search-fields-only-tp4253786p4253827.html >>> Sent from the Solr - User mailing list archive at Nabble.com. >>> >> >> > ---------------------- > CONFIDENTIALITY NOTICE > This e-mail (including any attachments) may contain confidential and/or > privileged information. If you are not the intended recipient or have > received this e-mail in error, please inform the sender immediately and > delete this e-mail (including any attachments) from your computer, and you > must not use, disclose to anyone else or copy this e-mail (including any > attachments), whether in whole or in part. > This e-mail and any reply to it may be monitored for security, legal, > regulatory compliance and/or other appropriate reasons. > >