This content has been marked as final. Show 5 replies
I think you might be mixing up phrasing with automatic phrasing. Phrasing is when the customer enters quotation marks around multiple search terms, so "red wine" would only match against those terms appearing in that sequence in the data (i.e. not wine red). Automatic phrasing is a function to add the quotations automatically even though the customer didn't enter them. This list can be manually defined in either Workbench or in Developer Studio, or can be calculated based on the contents of a dimension (or dimensions).
1) You can test a phrase search by doing a search in the reference application and including the quotation marks around the phrase - if this isn't working for you, then there is a problem at the data, or (2) is relevant
2) I believe phrased search only works with the standard Endeca analyser, so if you are using the new OLT analyser available in 6.4 with a non-latin language, phrased search won't work
3) To enable automatic phrasing, you need to make some changes to your web application code as well - see Chapter 7 in the Advanced Developer's Guide (here: http://docs.oracle.com/cd/E38682_01/MDEX.640/pdf/AdvDevGuide.pdf), and specifically the methods setNavERecSearchComputeAlternativePhrasings() and setNavERecSearchRewriteQueryToAnAlternativePhrasing()
Note (3) above is only for automatic phrasing - i.e. programmatically adding the quotation marks around two or more search terms to treat them as a phrase (so a search for Walking Dead would be transformed to "Walking Dead" and therefore not match Dead Man Walking, for example). You shouldn't need to do anything in the web application to support phrase searches when the customers include the quotation marks themselves.
Thanks a lot for providing information.
Please consider the following cases:
Case 1: I have added the terms crisp texture acid as a phrase in the workbench. Now when the user enters the search terms as crisp texture acid without the quotations, my expectation was the search terms would be phrased as they match the phrase given in the workbench.
Though when I check the phrases file in the pipeline folder, they do not have the entry for the phrases I have added in the workbench.
Case 2: I have added the terms crisp texture acid as a phrase and imported the xml to Developer Studio. Now when the user enters the search terms as crisp texture acid without the quotations, my expectation was the search terms would be phrased as they match the phrase given in the import phrases xml file..
Though when I check the phrases file in the pipeline folder, they do have the entry for the phrases I have added in the import xml.
In both these cases, I have added the parameters Ntpc=1 (for setNavERecSearchComputeAlternativePhrasings) to enable phrasing at the application level.
In all these cases the result was same and it does not match the result when the user enters crisp texture acid with quotations as I was expecting the same result for the search terms with and without quotations.
Please correct me if my understanding is wrong.
If you set Ntpc=1, but didn't set Ntpr=1, then it won't automatically rewrite the search as a phrased search but return a did-you-mean suggestion as a phrased search which you can render to the customer so they can select to submit the search as a phrased search. Only if you set Ntpc=1 and Ntpr=1 will the query be automatically rewritten as a phrased search.
You can check whether phrases are included in your index by checking the phrases.xml file in your ./data/processing directory (as this contains the configuration that is used during your baseline, a merge of the Workbench and Developer Studio files based on the master settings in the "ConfigManager" component).
Did you check in the reference application that a search for "crisp texture acid" (including quotation marks) returns results?
"I was expecting the same result for the search terms with and without quotations" - this isn't the case, if you do a phrased search then it will only return records that contain that exact phrase in one of the properties specified for search, whereas a non-phrased search will return results based on the factors of the search (match mode, cross-field enabled/disabled, properties in the search interface, etc.).
Thanks for providing the information. Summarizing the discussion with the below points.
1. In the reference application the search for "crisp texture acid" (including quotation marks) returns 0 results.
2. The search for "crisp texture acid" (excluding quotation marks) returns 481 results even after keeping the parameters Ntpc=1 and Ntpr =1
3. I have added the words low tannin to the phrase entry and tried the following.
a.) low tannin returns 4 records without quotations without setting Ntpc and Ntpr
b.) low tannin returns 3 records with quotations
c.) low tannin returns 3 records without quotations and with setting the parameters Ntpc =1 & Ntpr = 1.
Looks like the automatic phrasing is also governed by search factors like match mode, cross-field enabled/disabled, properties in the search interface, etc as the behaviour was different with the terms "crisp texture acid" and "low tannin"
Also both these phrases are included in the phrases.xml file in ./data/processing directory and the same file contains the merged entries from workbench and developer studio.
So to conclude even though the words are added as phrase either in workbench or developer studio, and though the params Ntpc & Ntpr are set to 1, the search for the same words without quotations might not yield the same results as the search with quotations.
Please correct me if wrong.
Just to summarize with my findings.
Case 1: Added Phrase does not exist in any of the Endeca records.
Initially I was giving some phrases which do not exist in any of the records. Since these phrases do not exist,
endeca search tries to break these words and get results instead of displaying no results found.
So in this case even adding the parameters Ntpc=1 & Ntpr=1 does not matter.
The results vary depending on the match modes used.
Case 2: Added phrase exists in the endeca records.
In this case I have added the phrase which does exists in some of the endeca records and had seen that endeca does consider the phrase and retrieve the results.
For endeca to consider the phrase we need to add the parameters Ntpc=1 & Ntpr=1.
The result is same even with different match modes