I'm having a problem with the search api, it looks like the availability field is not indexed.
In my case the available dates have sid 2.

When I index the fields, al the states are indexed except the fields with sid 2.

For example: availability from 10-05 till 15-05, rest is not available / not communicated.
Then in the search api all fields are indexed, except the dates from 10-05 till 15-05, and that are just the dates that I want to be indexed.

Is there a (quick) fix so that the right availability is added to the search_api?

Comments

fietserwin’s picture

I think that this is how it works. It is ugly, but it seemed to work back then. The problem is that availability cannot be modeled as a simple scalar property (like price for 1 night, wifi available, number of persons allowed). To integrate with search API, I found a(n ugly) solution that stores all unavailable dates in the index and then alters the query to not search for a simple scalar value but does a "select 1 where not exists ...) subquery. So only NOT available dates are stored in the search index table...

So, your data seems to be OK. If you cannot get it to work, something else is wrong. Apart form the data can you explain what is going wrong in your situation and how you modeled the search indices?

fietserwin’s picture

Status: Active » Closed (works as designed)

I am currently going through the issue queue and am closing old issues that have not had any response since long. Please feel free to reopen if you are still experiencing the problems, providing as much of the requested details as possible.

Note: I recently did some programming for this module and looking at the search api integration code I still have to confirm that it is ugly, unreadable, not maintainable, etc. :( I have even been thinking about removing it and cleaning up in the latest version, but as I do not know how many sites do use this feature tot heir satisfaction, I decided to not remove it after all.