Closed Bug 988867 Opened 10 years ago Closed 10 years ago

Enhance search engines so they will give mockup suggestions

Categories

(Mozilla QA Graveyard :: Infrastructure, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: cosmin-malutan, Assigned: cosmin-malutan)

References

Details

Attachments

(1 file, 4 obsolete files)

We have to enhance search engines so they will give suggestion. This is need for bug 942737.
Attached patch patch_v1.0 (obsolete) — Splinter Review
Here is the patch for this.
Assignee: nobody → cosmin.malutan
Status: NEW → ASSIGNED
Attachment #8397846 - Flags: review?(hskupin)
Comment on attachment 8397846 [details] [diff] [review]
patch_v1.0

I change the review flag to Andreea and Andrei, I thought it was reviewed by Henrink but it wasn't.
Attachment #8397846 - Flags: review?(hskupin)
Attachment #8397846 - Flags: review?(andrei.eftimie)
Attachment #8397846 - Flags: review?(andreea.matei)
Comment on attachment 8397846 [details] [diff] [review]
patch_v1.0

Review of attachment 8397846 [details] [diff] [review]:
-----------------------------------------------------------------

::: firefox/search/mozsearch_suggestions.json
@@ +1,1 @@
> +["mozilla",["Mozsearch suggestion 0","Mozsearch suggestion 1","Mozsearch suggestion 2","Mozsearch suggestion 3","Mozsearch suggestion 4","Mozsearch suggestion 5","Mozsearch suggestion 6","Mozsearch suggestion 7","Mozsearch suggestion 8","Mozsearch suggestion 9"],[],[]]

Please properly indent these json responses.
It will make them easier to maintain.

Why do we have 2 empty Arrays at the end? I don't think

::: firefox/search/opensearch.xml
@@ +7,2 @@
>    <Url type="text/html" method="get"
>         template="http://hg.mozilla.org/qa/litmus-data/raw-file/tip/firefox/search/searchresults.html?q={searchTerms}"></Url>

This url is no longer valid.
Please update it to use mozqa.com

::: firefox/search/opensearch_suggestions.json
@@ +1,1 @@
> +["mozilla",["Openserach suggestion 0","Openserach suggestion 1","Openserach suggestion 2","Openserach suggestion 3","Openserach suggestion 4","Openserach suggestion 5","Openserach suggestion 6","Openserach suggestion 7","Openserach suggestion 8","Openserach suggestion 9"],[],[]]

typo: Opensearch

We should also be consistent with the casing: either `opensearch` or `OpenSearch`
Attachment #8397846 - Flags: review?(andrei.eftimie)
Attachment #8397846 - Flags: review?(andreea.matei)
Attachment #8397846 - Flags: review-
Attached patch patch_v2.0 (obsolete) — Splinter Review
Thanks for review Andrei, here are the updates.
Attachment #8397846 - Attachment is obsolete: true
Attachment #8398516 - Flags: review?(andrei.eftimie)
Attachment #8398516 - Flags: review?(andreea.matei)
Comment on attachment 8398516 [details] [diff] [review]
patch_v2.0

Review of attachment 8398516 [details] [diff] [review]:
-----------------------------------------------------------------

::: firefox/search/mozsearch_suggestions.json
@@ +1,4 @@
> +["Moz",
> +  [
> +    "MozSearch suggestion 0",
> +    "MozSearch suggestion 1",

I believe we would need better names for these suggestions. On the other side, they're general and suits for other projects that might use this.
Henrik, what do you think?
Attachment #8398516 - Flags: review?(hskupin)
Comment on attachment 8398516 [details] [diff] [review]
patch_v2.0

Review of attachment 8398516 [details] [diff] [review]:
-----------------------------------------------------------------

This has a r+ from me with the mentioned nit fixed.

::: firefox/search/mozsearch_suggestions.json
@@ +8,5 @@
> +    "MozSearch suggestion 5",
> +    "MozSearch suggestion 6",
> +    "MozSearch suggestion 7",
> +    "MozSearch suggestion 8",
> +    "MozSearch suggestion 9"]

Just one nit from me: please keep this consistent and move the closing bracket to a newline as it is in the other json file.
Attachment #8398516 - Flags: review?(andrei.eftimie)
Attachment #8398516 - Flags: review?(andreea.matei)
Attachment #8398516 - Flags: review+
Comment on attachment 8398516 [details] [diff] [review]
patch_v2.0

Review of attachment 8398516 [details] [diff] [review]:
-----------------------------------------------------------------

It's good to see that it is not that hard to actually do the switch over to json. Please see my inline comment.

::: firefox/search/mozsearch_suggestions.json
@@ +1,4 @@
> +["Moz",
> +  [
> +    "MozSearch suggestion 0",
> +    "MozSearch suggestion 1",

Yes, I vote for better names here too, but we should also return descriptions, and search urls. Also I don't think we need 10 suggestions. About 5 should be enough.

So what should we return:
* Shorter suggestions
* Variations - not all suggestions should start with Moz, but also should contain it in the middle or at the end of the word
* I would add "Mozi" as search term too, and return different values
* We have to update the test case so it mentions which search terms are supported
Attachment #8398516 - Flags: review?(hskupin) → review-
Attached patch patch_v2.1 (obsolete) — Splinter Review
I added description and URLs.
As for suggestions I took random suggestion from different already existing engines(Google, Wikipedia and Yahoo).
Attachment #8398516 - Attachment is obsolete: true
Attachment #8399428 - Flags: review?(andrei.eftimie)
Attachment #8399428 - Flags: review?(andreea.matei)
Comment on attachment 8399428 [details] [diff] [review]
patch_v2.1

Review of attachment 8399428 [details] [diff] [review]:
-----------------------------------------------------------------

Looks better to me.
Attachment #8399428 - Flags: review?(hskupin)
Attachment #8399428 - Flags: review?(andrei.eftimie)
Attachment #8399428 - Flags: review?(andreea.matei)
Attachment #8399428 - Flags: review+
Comment on attachment 8399428 [details] [diff] [review]
patch_v2.1

Review of attachment 8399428 [details] [diff] [review]:
-----------------------------------------------------------------

::: firefox/search/mozsearch_suggestions.json
@@ +1,1 @@
> +["Mozi",

It still misses a second search term. Also I don't see an update for the appropriate test page, which tells what search terms are supported. If you ask me I would use 'm' and 'mo'.

::: firefox/search/opensearch_suggestions.json
@@ +1,1 @@
> +["Mozi",

Same here as for the mozsearch engine.
Attachment #8399428 - Flags: review?(hskupin) → review-
(In reply to Henrik Skupin (:whimboo) from comment #10)
> ::: firefox/search/mozsearch_suggestions.json
> @@ +1,1 @@
> > +["Mozi",
> 
> It still misses a second search term. Also I don't see an update for the
> appropriate test page, which tells what search terms are supported. If you
> ask me I would use 'm' and 'mo'.
No matter of the search term I will retrieve the same answer because the response is hardcoded.
What I can do is to give the search term in the path for the json file and offer something like this:
> <Url type="application/x-suggestions+json" method="GET" template="http://mozqa.com/data/firefox/search/mozsearch_suggestions_{searchterm}.json"/>
and create two json files:
>mozsearch_suggestions_m.json
>mozsearch_suggestions_mo.json

If this is what you have in mind it will update the patch.
Thanks
If that works, yeah lets do that.
Attached patch patch_v2.2 (obsolete) — Splinter Review
I added suggestions for "m" and "mo" keywords.
Attachment #8399428 - Attachment is obsolete: true
Attachment #8401277 - Flags: review?(andrei.eftimie)
Attachment #8401277 - Flags: review?(andreea.matei)
Comment on attachment 8401277 [details] [diff] [review]
patch_v2.2

Review of attachment 8401277 [details] [diff] [review]:
-----------------------------------------------------------------

Way better this way :)
Attachment #8401277 - Flags: review?(hskupin)
Attachment #8401277 - Flags: review?(andrei.eftimie)
Attachment #8401277 - Flags: review?(andreea.matei)
Attachment #8401277 - Flags: review+
Comment on attachment 8401277 [details] [diff] [review]
patch_v2.2

Review of attachment 8401277 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good to me. Please fix the one nit, and we are good to get this landed.

::: firefox/search/mozsearch.xml
@@ +8,3 @@
>    <Url type="text/html" method="GET"
>         template="http://mozqa.com/data/firefox/search/searchresults.html?q={searchTerms}"/>
>    <SearchForm>http://mozqa.com/data/firefox/search/searchresults.html</SearchForm> 

nit: please kill this trailing white-space.
Attachment #8401277 - Flags: review?(hskupin) → review+
Attached patch patch_v2.3Splinter Review
Thanks for review Henrik, I pass this to Andreea with the nit fixed!
Attachment #8401277 - Attachment is obsolete: true
Attachment #8401760 - Flags: review?(andreea.matei)
Comment on attachment 8401760 [details] [diff] [review]
patch_v2.3

Review of attachment 8401760 [details] [diff] [review]:
-----------------------------------------------------------------

Landed:
http://hg.mozilla.org/qa/testcase-data/rev/f96a01c5508c
Attachment #8401760 - Flags: review?(andreea.matei) → review+
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Something went wrong here. This check-in is not listed:
http://hg.mozilla.org/qa/testcase-data/
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
My bad. Not sure what went wrong, but now the entry appeared in the pushlog. Let me see what's wrong with mozqa.com in fetching those updates.
Status: REOPENED → RESOLVED
Closed: 10 years ago10 years ago
Resolution: --- → FIXED
Product: Mozilla QA → Mozilla QA Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: