I am using a view control in an XPage, and have incorporated a search with much struggling.
I also have a dropdown to select a category, to be used as an additional filter with the search.
My query is now:
sessionScope.searchTerm AND Field Category=" + sessionScope.categoryname + "
Everything finally works except that the category filter is finding non-exact matches, for example "Management" finds the documents in the categories "Management" but also in "Facilities Management". This is not acceptable.
I tried setting searchExactMatch=true in the View properties, but this gives a stack trace, and in the log is the error: "GTR search error: Case sensitive parameter error.: Query is not understandable"
So I guess this parameter is for exact case matches instead of exact search term matches as is implied. Not what it says in the help, but OK I roll with the punches as usual.
If I use the "Filter by category name" the category filter works great with no search term, and the search seems to work OK except that the categoryFilter setting is now ignored.
This seems to be the common behavior, that these settings all work fine in isolation but never in combination. This is what I found for view keys as well.
I am now out of ideas, can anyone offer assistance?
This is a bit hackery solution but You could have additional computed field categorySearch with additional content delimiters, for example You could add additional % characters: %Completed% and then Your search query would look like this:
sessionScope.searchTerm AND Field categorySearch=%" + sessionScope.categoryname + "%
I hate myself for proposing this kind of solution but if this work then maybe I will be forgiven.
You have to search according to this article: http://www-10.lotus.com/ldd/ddwiki.nsf/dx/Searching_for_Documents#Full-text+Search
In your case do the following for the Category part:
"[Category] = \"" + sessionScope.categoryname + "\""
Related
Does anyone know how to ensure we can return normal result as well as accented result set via the azure search filter. For e.g the below filter query in Azure search returns a name called unicorn when i check for record with name unicorn.
var result= searchServiceClient.Documents.SearchAsync<myDto>("*",new SearchParameters
{
SearchFields = new List<string> {"Name"},
Filter = "Name eq 'unicorn'"
});
This is all good but what i want is i want to write a filter such that it returns record named unicorn as well as record named únicorn (please note the first accented character) provided that both record exist.
This can be achieved when searching for such name via the search query using language or Standard ASCII folding search analyzer as mentioned in this link. What i am struggling to find out is how can we implement the same with azure filters?
Please let me know if anyone has got any solutions around this.
Filters are applied on the non-analyzed representation of the data, so I don’t think there’s any way to do any type of linguistic analysis on filters. One way to work around this is to manually create a field which only do lowercasing + asciifloding (no tokenization) and then search lucene queries that look like this:
"normal search query terms" AND customFilterColumn:"filtérValuèWithÄccents"
Basically the document would both need to match the search terms in any field AND also match the filter term in the “customFilterColumn”. This may not be sufficient for your needs, but at least you understand the art of the possible.
Using filters it won't work unless you specify in advance all the possibilities:
for example:
$filter=name eq 'unicorn' or name eq 'únicorn'
You'd better work with a different analyzer that will change accents to it's root form. As another possibility, you can try fuzzy search:
search=unicorn~&highlight=Name
I found this Multiple Choice Dual List (with Sort) form control and have a question about the sorting functionality. From the description, it looks like the sorting functionality only works if we have something like this CHARINDEX(','+CONVERT(varchar, ItemID)+',', ',1,3,2,5,4,') in the Order By field. I tested with a couple of items and saw that if I hard-coded the Order By as instructed, it worked. Is there a way / something to put in the Order By so that it accepts the (new) order of the items in the second (red) box - without hard-coding? THANK YOU!
My authors (the left box) are from a SQL query.
The WHERE statement of my Repeater is like this, if it's of any help:
'|' + '{%CurrentDocument.Authors#%}' + '|' LIKE '%|' + CONVERT(varchar, AuthorsID) + '|%' Everything is working; I just need that sorting functionality to work dynamically.
I think the easies way to achieve this would be implementation of some logic on the client with javascript/jquery.
That would be my tool. The example order by is meant to show kind of how it works, your order by would look like:
CHARINDEX(','+CONVERT(varchar,AuthorsID)+',', '{%CurrentDocument.Authors#%}')
Assuming that Authors is the field that has the multiselect with order form tool, and AuthorsID is the table's identity row.
Does that help?
does anybody know if there is a possibility to search for '-' using FTSearch?
Set col = db.ftsearch({ [services] = "-"}, 0)
dat requests does not work and instead says:
Notes error: Full text error; see log for more information (
[services] = "-")
Short answer is no.
The full text search treats most symbol characters as a white space. The exception is if the search term itself is wrapped in quotes.
The FT search engine also uses 3-gram for searching. This means that less then 3 characters will not return the results you expect. White spaces would be treated in that search, but only in the context of the found text.
For example: "ce " would find "space " but not "space." or "space" or "spaced".
If you are looking for the field that only contains "-", then a better solution is to create a view with a column containing that field value, and/or filter by that field being that value.
Looks like you are trying to do a full text search in a view? You probably would get better response time and less server impact to use #Formula language if you are working with a view.
I try to keep away on doing full text searches on the entire database. You can use a search on a view collection for faster results. There is no restriction on how many views you can have in a db. There is a cost for everything though. There are so many little tricks that can be used to get better results. Please give us more details on what you are trying to do.
I am indexing the title field for few products in Solr.
But when I am searching, I am not getting those titles in response.
For eg. I am storing following as title : Baboons Typing Tshirt
But when I am searching following I am not getting any result !!!
1)title:Baboons
2)title:(Baboons Typing Tshirt)
3)title:(Baboons*)
On the otherhand, if I am searching like this, I am getting lot of results
1)title:(Tshirt)
I have indexed many titles containing word Tshirt but I want to search a specific title which is failing..!!
I dont know whether Solr is ignoring first words, or it is doing something random.
My Question is basically: If I have a search title with lots of words, I will like to match it with the title which contains maximum common terms.
How to do it?
Thanks
Solr works like that by itself. You don't have to change anything.
You have to be careful how you set up your fields in schema.xml, i.e. how analysis is done.
You can use Solr's admin > Analysis interface to see how exactly your title field (when indexing) and query (when searching) is processed (tokenized, transformed).
Remember, match, in order to occur, requires identical word (case and everything) on both sides (index & query).
To open your index and see how Solr has actually indexed your data, use Luke.
Searching Magento with fulltext search engine and like method , it will store results in catalogsearch_fulltext table in "data_index" field where it stores value in the format like
each searchable attribute is separated with |.
e.g
3003|Enabled|None||Product name|1.99|yellow|0
here it store sku,status,tax class, product name , price ,color etc etc
It stores all searchable attribute value.
Now the issue is for Configurable product , it will also store the associated products name ,price ,status in the same field like
3003|Enabled|Enabled|Enabled|Enabled|None|None|None|None|Product name|Product name|associted Product name1|associted Product name2|associted Product name3|1.99|2.00|2.99|3.99|yellow|black|yellow|green|0|0|0|0
So what happen is if i search for any word from associated product, it will also list the main configurable product as it has the word in its "data_index" field.
Need some suggestion how can i avoid associated products being included in data_index, So that i can have perfect search result.
thanks
We are looking into our search as well and it has been surprising to see the inefficiencies included in the fulltext table. We have some configurable products as well that have MANY variations and their population in the fulltext search is downright horrendous.
As for solutions, I can only offer my approach to fix the problem (not completed: but rather in the process).
I am extending Magento to include an event listener to the process of indexing the products (Because catalog search indexing is when the fulltext database is populated). Once that process occurs, I am writing my own module to remove duplicate entries from the associated products and also to add the functionality of adding additional search keyword terms as populated from a CSV file.
This should effectively increase search speed dramatically and also return more relevent search results. Because as of now, configurable products are getting "search bias" in the search results.
This isn't so much of an answer as a comment, but it was too lengthy to fit in the comments but I thought this might be beneficial to you. Once I get my module working, if you would like, I can possibly give you directions on how you could implement a similar module yourself.
Hope that helped (if only for moral support in magento's search struggle)