I used /_api/search/query?querytext='${query}'&sourceid='b09a7990-05ea-4af9-81ef-edfab16c4e31' to search the user profile however it is returning results from Distribution list as well.
For example, when I search 'Sydney', I want to return people who have 'Sydney' as location, but it is also returning people who are in a Distribution list called 'Sydney Support'.
Can anyone help me with this?
You could add some limit querytext like:
Location=Sydney
Related
I would like to know if there is a way to search in Elasticsearch based upon a user's preferences. Basically, we know a number of tags that a user likes (and how many times they liked that tag so it has a weight to it). The posts in the index have tags attached to them. We like to rank posts search results based upon the tags that they like!
Any course of action on how to accomplish this? Another Index? Child? New to Elasticsearch and I love it already.
Thank you!
You can use function score query or custom filters score query to boost results based on the tags that each user has. You will need to wrap user's request into functions score query or custom filters score query with a filter for each tag. The boost of each filter will depend on the number of times this tag was liked by the user.
I'm using haystack with whoosh for development purposes.
I want search results based on django models to be filtered by the user that created them.
Please see my other post Filter haystack result with SearchQuerySet for details.
Basically I had to add User to my search index. But I noticed, when I manually change the user_id of a record, search is broken. After thinking about it this even makes sense. But, this means I have to rebuild the index after each field update in each model? Surely that doesn't scale at all?
I thought the engine would find the object by id, then look it up in the database, and return a current instance for further processing like filtering. It seems like everything is cached in the index so must be synchronized in realtime for search results to show up? Am I missing something here?
This documentation helped shed some light:
http://docs.haystacksearch.org/dev/searchindex_api.html
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)
Some popular words, like "food," are used all over the world as loan words.
I am trying to use flickr.photos.search to get photos from one specific language or region.
I didn't find a setting for this in http://www.flickr.com/services/api/flickr.photos.search.html
I tried these two ways, but neither worked:
http://api.flickr.com/services/rest/?method=flickr.photos.search&api_key=XXXXXXXXXX&tags=food&format=json&location=japan
//lang=jp
I searched in Google and only found that YQL can search by location. (I will use YQL in another way, too many calls will over the api will be limited.)
I also found that in flickr.photos.search one can set a lat, lon, and radius, but the range is a circle, so this will not limit a search to a specific country.
None of these are good choices for me. Can anyone help?
There are actually a few interesting ways to do this.
The way I would do it is to first find the place you are looking for by using the place API:
flickr.places.find: http://www.flickr.com/services/api/flickr.places.find.html This will return a list of WOE (Where on Earth) ids for a given query. Your query can be anything from a street address to a country.
Once you have the WOE id, you could then submit a flickr.photos.search query including the optional place_id or WOE id.
Another fun way to do this would be to call the flickr.places.tagsForPlace method once you have a WOE id, and then search for your photos by these tags. This might produce more interesting results and also weed out the users who didnt specify a place, but did specify tags.
I am using the AdvancedDatabaseCrawler as a base for my search page. I have configured it so that I can search for what I want and it is very fast. The problem is that as soon as you want to do anything with the search results that requires accessing field values the performance goes through the roof.
The main search results part is fine as even if there are 1000 results returned from the search I am only showing 10 or 20 results per page which means I only have to retrieve 10 or 20 items. However in the sidebar I am listing out various filtering options with the number or results associated with each filtering option (eBay style). In order to retrieve these filter options I perform a relationship search based on the search results. Since the search results only contain SkinnyItems it has to call GetItem() on every single result to get the actual item in order to get the value that I'm filtering by. In other words it will call Database.GetItem(id) 1000 times! Obviously that is not terribly efficient.
Am I missing something here? Is there any way to configure Sitecore search to retrieve custom values from the search index? If I can search for the values in the index why can't I also retrieve them? If I can't, how else can I process the results without getting each individual item from the database?
Here is an idea of the functionality that I’m after: http://cameras.shop.ebay.com.au/Digital-Cameras-/31388/i.html
Klaus answered on SDN: use facetting with Apache Solr or similar.
http://sdn.sitecore.net/SDN5/Forum/ShowPost.aspx?PostID=35618
I've currently resolved this by defining dynamic fields for every field that I will need to filter by or return in the search result collection. That way I can achieve the facetted searching that is required without needing to grab field values from the database. I'm assuming that by adding the dynamic fields we are taking a performance hit when rebuilding the index. But I can live with that.
In the future we'll probably look at utilizing a product like Apache Solr.