maybe there is another way around this but my problem started with a
search query that had an index and type already created.The query always
returned a SearchResult. So I built my logic around that, i.e using the
SearchResult object in my JSP page.
But when I restarted fresh I had no index and type created (only a
mapping file) and as such I got some IndexMissing excpetions instead. I
then created the index. But I still got exception due to the type that
There seems not to be a way to create a type. The only way to have the
type created is to insert a dummy document and remove it. That way I
finally got the SerachResult with 0 hits wich I expected in the first run...
Of course I could create some logic in the JSP page to handle null
values for the SearchResult, but that would be much messier. I even
tried to create an empty SearchResult, but there was no public
So, I would love if there was a way to create the type (which would put
the index in a a state equal to that when the type exists, but has 0