> I have two fields in the bean class, id and title. > After adding the bean to SOLR, I want to search for, say > "kitten", in all > defined fields in the bean, like this -- query.setQuery( > "kitten"); -- > But I get results only when I affix the bean field name > before the search > text like this -- query.setQuery( "title:kitten"); -- > > Same case even when I use SolrInputDocument, and add these > fields. > > Can we search text in all fields of a bean, without having > to specify a > field?
With dismax, you can query several fields using different boosts. http://wiki.apache.org/solr/DisMaxQParserPlugin