Moondragon: Natural Language-Based Property Search At Housing.com

Contributor: Sakshi Jindal

Search experience worldwide is powered by Google. Users are now autowired to search in natural language. Moreover, assistants like Alexa, google mini and Siri have certainly increased users’ inclination towards voice-based search. This was a domain untouched by real estate and Moondragon made its grand entry!

Moondragon with its natural language processing and recommending was required to give a similar experience to home seekers to ease their journey of house-hunting.

What do users search?

Real estate searches are not too wide or different and can be easily put into two categories. Let’s call them primary filters and secondary filters. Primary filters are filters which provide segments that are almost mandatory to narrow down to a meaningful search. About 75% of users use these filters. These filters include location, price range and configuration. By design, these filters are the ones that are recognized as well as recommended by Moondragon. Secondary filters are extra specific that are secondary as the name suggests. Amenities, listed as “furnishing” for example is a secondary filter. Secondary filters are recognized but not recommended by Moondragon.

How does Moondragon work?

OpenNlp and Elasticsearch are the backbone of Moondragon.

Apache openNLP

Apache openNLP has been used at various steps in the whole search experience.

For Recognition

Apache openNLP NER is trained using a training data which is rich in all primary and secondary filters in the way a user may type/search. Some sample training searches are”

– “2 bhk in powai
– “under 3 cr project in Andheri”,
– “Fully furnished ready to move in 2 bhk apartments in Khar”,
– “4 bhk in Gurgaon by owner”.

NER, when trained using these searches, gives us a model which is used for filter extraction from the search string.

For providing a typeahead experience

Inspired by Google, we wanted to give a type-ahead experience to our users. Our user acceptance tests showed us that either users start with location or with configuration. If the user types filters, say “2 bhk”, we want to give a recommendation of locations like “2 bhk in powai”, “2 bhk in andheri”. On the same lines, if our user starts with a location like “powai”, we may want to suggest him primary filters like “powai 2 bhk” or “powai under 4 cr”. The NLP model here provides us the position of his identified filter which helps us in re-ordering our suggestion for a smooth user experience.

Elasticsearch

Location validation, location suggestion, relevance, faster response time is owned by elasticsearch. After filters are extracted from search string by NLP, they are validated by a validation layer. This layer converts the filters to domain filters which are sent to our supply index.

Custom scoring and sorting

We have exploited Elasticsearchs’ custom scoring and sorting to give our users more relevant results. The names of our supply locations, projects, establishments and developers are analyzed using custom analyzers. They have been tokenized using edgegrams as well as keywords. All but last words are searched using a keyword search and the last word is searched using edgegram search. To help with spell checks, fuzzy string match of elasticsearch is exploited. Constant score with boost contributes to our scoring algorithm. Exact full name matches are given an extra boost. The docs with a high score, high demand and high supply win the race and are promoted and suggested as we type.

Amalgamation of above two gave us the search experience which we now have on housing.com. Hence, ‘ready to move apartment in 2BHK facing east with swimming pool and lift in Bandra under 5 cr’ search is a reality now.

Let me also quickly tell you how Moondragon was conceived. It started off with our preparation for Hackathon 3.0. Guess what? We won the internal as well as global Hackathon and our team implemented this in our organization. This was something that the real estate sector had never used before and now, it’s really working for our users!

Happy searching!