Skip to main content

Posts

Semantic Search and Future of Search Engines

Search engines are used very differently from how they were just ten years ago. Search products have had a rich and vibrant diversity in terms of features, use cases, evolution and audience. There is more data to be sorted through, and greater expectation to get to the most relevant data points faster. User behaviour is gradually shifting away from sorting through several search results manually to get to the information they need, to getting answers up front along with references. Evolution A very good summary of search engines and their evolution is presented by Vaibhav Saini, Co Founder at Signy:  https://hackernoon.com/evolution-of-search-engines-how-will-search-engines-look-like-after-10-years-8996321e93d . We see how we started with search engines focused on index based text searching to search engines recently incorporating more advanced search metaphors, including image search, relevance measures such as back links and popularity, voice input and even AR. Learning user intent T
Recent posts

JavaScript Closure Gotcha with Vuex

Closures in Javascript are not just an additional feature, they're inherent to the language. Every time a function is created, it's lexical scope is automatically captured in it's current state along with the function.  It can quickly get complex when using reactive paradigms, such as with frameworks like Vue , as happened with me today. Here's the code: async setSwaggerClient({ state, commit, rootState}) { ... let authToken = rootState.user.key; Swagger( '/api/swagger.json', { requestInterceptor: (req) => { req.headers["X-CSRFToken"] = g_csrftoken; if(authToken !== null) { req.headers["Authorization"] = `Token ${authToken}`; } return req; } } ) ... } The function setSwaggerClient is a Vuex action that creates and sets the swagger client in a Vuex store. During creation I pass a functi

Meteor template events and topmost element

While writing a custom template, I discovered that events from the topmost element in the template are not caught by template.events which is a strange but workable issue in Meteor. Just wrap the whole body within a dummy div as shown: <template name="sometemplate"> <div> <div class="eventSource"> ... </div> </div> </template> Template.sometemplate.events({ 'click .eventSource': function(event, template) { ... } });

The autoform-select2 + AJAX data adventure

While developing a Gig creation form for Zoomout, using meteor-autoform and select2, I realized that search and add feature for adding artists to a Gig would be a problem. Select2 supports AJAX datasource for generating options based on user input, but till version 3.5 it depended on the use of a hidden input field for adding new options on the fly. The autoform-select2 package, although a great tool, did not yet offer support for hidden input fields.  #14  from the autoform-select2 issues describes this problem. Select2 recently released  4.0.0-rc.1 which thankfully removes the need for a hidden input field, but the meteor-select2 package, on which the autoform-select2 package depends, still uses 3.5.1 of select2. So till meteor-select2 releases with an upgraded version of select2, which may happen when select2 makes a stable 4.0.0 release, follow these steps to make use of an AJAX datasource in your meter autofroms: git clone https://github.com/abhishekbatra/meteor-select2 Create a