|
Rank: Member
Groups: Registered
Joined: 10/12/2017 Posts: 17
|
Though the search term: Jack Jill is the same as: Jack and Jill or the search term: computer desktops is the same as: computer and desktop, using the later term starts adding the word and to the list of PopularSearches. I'm sure this would happen if folks did a lot of searching using OR too. Eventually the word OR is going to show up in the list too.
Is there a way to keep these search terms from showing up in the PopularSearches?
Jack
|
|
Rank: Advanced Member
Groups: Administrators, Registered
Joined: 8/13/2004 Posts: 2,669 Location: Canada
|
Hi Jack, You mean the PopularSearches feed that is used for autocomplete I believe. It doesn't add individual search terms to the feed, only complete queries, so you won't start getting AND or OR as queries, unless people are searching for those words by themselves. Jim -your feedback is helpful to other users, thank you!
|
|
Rank: Member
Groups: Registered
Joined: 10/12/2017 Posts: 17
|
So is there a way to remove the word and from the autocomplete then or will it eventually disappear.
Thanks for you answer.
Jack
|
|
Rank: Advanced Member
Groups: Administrators, Registered
Joined: 8/13/2004 Posts: 2,669 Location: Canada
|
Yes you should be able to do the Javascript method described here https://keyoti.com/produ...te%20customizationJS.htm-your feedback is helpful to other users, thank you!
|
|
Rank: Member
Groups: Registered
Joined: 10/12/2017 Posts: 17
|
Here is a test version of my search page. Yes, I'm using the JavaScript, as I seem to be having a problem getting the ASP.NET controls working yet. As you will be able to see, the word: "and" is in the list, though if you click on it or enter it in the textbox, it returns no results. Test Search pageI'm still a little rusty on my JavaScript and have a couple questions about the code on the link you sent me to. 1. It says that this code only needs to be on the page and it will be called automatically? True? 2. What is he purpose of the Variable: suggestionText? Since in the current code it is not used, I'm guessing that it is what I'll need to check to find the word "and" so I can eliminate it and/or any other words that shouldn't be there? 3. I'm guessing if I don't want to modify text, I can either remove it or comment it out? Same with the last line if I don't need to add words? 4. if I remove the array element as I locate the unwanted word, will it automatically resize the array? I just don't remember, as I try to avoid arrays like the plague. :) Thanks again for getting me going in the right direction. Code:keyotiSearchAutocomplete.sew_OnAutoCompleteSuggestionsGenerated = function (query, suggestions) {
//how to iterate the generated suggestions for (var i = 0; i < suggestions.length; i++) { var suggestionText = suggestions[i][0]; //# of results, will be -1 if AutoCompleteQueryShowNumberOfResults==false var suggestionNumberOfResults = suggestions[i][1];
//modify the text? suggestions[i][0] = suggestions[i][0] + "*"; //turn each suggestion into a wildcard } //add a bonus suggestion, with '10' predicted results suggestions[suggestions.length] = ["bonus", 10]; }
|
|
Rank: Member
Groups: Registered
Joined: 10/12/2017 Posts: 17
|
You will also notice now, that the word "and" is in your PopularSearches Cloud in the Demo. Of course it returns no results, but it is there regardless.
Jack
|
|
Rank: Advanced Member
Groups: Administrators, Registered
Joined: 8/13/2004 Posts: 2,669 Location: Canada
|
Right, but you put it in there by searching for just the word "and" presumably, not "aaa AND bbb"? -your feedback is helpful to other users, thank you!
|
|
Rank: Member
Groups: Registered
Joined: 10/12/2017 Posts: 17
|
Jim wrote:Right, but you put it in there by searching for just the word "and" presumably, not "aaa AND bbb"? Correct and if I did searches for "aaa AND bbb", then what shows up is the "aaa AND" If you search for "Jack AND Joe" and repeat that with the "Jack AND" changing the second name multiple times, then you eventually get the "Jack AND" in the Cloud. My point is, it seems that words up to maybe 3 characters in length shouldn't be able to show up there at all as a single word or unless it is part of a Phrase, which would be what is in quotes. We have the scenario where someone might want use the following search term: Affidavit and "Someone's name", but checking many names. Now the "Affidavit and" appears in the Cloud. Affidavit by itself is fine, but having the "and" showing up whether it is by itself or in conjunction with another word like in the example above, to me is wrong. But then I might be looking at this all wrong and this really is the norm for searches and I should leave well enough alone. Jack
|
|
Rank: Advanced Member
Groups: Administrators, Registered
Joined: 8/13/2004 Posts: 2,669 Location: Canada
|
Oh I see now. If you search for "abc AND xyz", but xyz is not in the index, then it will remove xyz from the cloud entry. We did that because we needed a way to protect against people gaming it to embarrass the site owners. Otherwise users could put in swear words etc. We could have used a filter instead of requiring the word to be in the index, but filters cannot be 100% perfect. I agree that having AND or OR with nothing after it isn't good. I can give you a new build for v7 without that problem if you like? Jim -your feedback is helpful to other users, thank you!
|
|
Rank: Member
Groups: Registered
Joined: 10/12/2017 Posts: 17
|
I would like that Mr. Jim. Thanks
However, if there is a way to use JavaScript to fix this and add any new words as the arise... I guess that would be a filter though, wouldn't it? :)
Jack
|
|
Rank: Advanced Member
Groups: Administrators, Registered
Joined: 8/13/2004 Posts: 2,669 Location: Canada
|
Actually you can do this Code: var keyotiSearchCloud_createChildControlsBase = keyotiSearchCloud.createChildControls; keyotiSearchCloud.createChildControls = function (data) { for (var i = 0; i < data.Items.length; i++) { //look at data.Items[i] and modify as needed } keyotiSearchCloud_createChildControlsBase(data); };
You will see that there is data.Items[i].QueryEscaped which you could change as needed. I haven't tried it, but don't foresee any problems. Let me know if you still need that new build, otherwise it will just go out with the next release. Jim -your feedback is helpful to other users, thank you!
|
|
Rank: Member
Groups: Registered
Joined: 10/12/2017 Posts: 17
|
I think I would prefer the new build and not have extra code running around that I'd have to keep track of or update constantly.
Jack
|
|
Rank: Advanced Member
Groups: Administrators, Registered
Joined: 8/13/2004 Posts: 2,669 Location: Canada
|
Here you go https://www.dropbox.com/...it-Setup-v7-UDb.msi?dl=0-your feedback is helpful to other users, thank you!
|
|
Rank: Member
Groups: Registered
Joined: 10/12/2017 Posts: 17
|
What files have changed and what will I need to copy over to the website? Thanks
Jack
|
|
Rank: Advanced Member
Groups: Administrators, Registered
Joined: 8/13/2004 Posts: 2,669 Location: Canada
|
Keyoti4.SearchEngine.Core.DLL Keyoti4.SearchEngine.Web.DLL Keyoti4.SearchEnginePro.Web.DLL Keyoti_SearchEngine_Web_Common/SearchWebService.asmx Keyoti_SearchEngine_Web_Common/SearchService.svc Think that's it. -your feedback is helpful to other users, thank you!
|
|
Rank: Member
Groups: Registered
Joined: 10/12/2017 Posts: 17
|
Thanks.
So can you give me a basic idea how this fixes the problem?
Jack
|
|
Rank: Advanced Member
Groups: Administrators, Registered
Joined: 8/13/2004 Posts: 2,669 Location: Canada
|
If the user searches "knownword AND unknownword" then it will add "knownword" to the cloud instead of "knownword AND". To clear out existing entries you don't like, edit SearchTally.txt in the index dir -your feedback is helpful to other users, thank you!
|
|
Rank: Member
Groups: Registered
Joined: 10/12/2017 Posts: 17
|
|
|