Hi everyone,

i am new to SOLR and I have experienced a strange behavior:

I have defined a field called name of type "string". This field contains
values with trailing spaces such as " John".
This is intended and the space needs to "survive".

The space is in the index as I can see when using Luke.

But when I am retrieving documents from the index using :

    final CommonsHttpSolrServer sorlServer =
server.connection(query.retrieveCore());
    final SolrQuery solrQuery = query.getSolrQuery();
    final QueryResponse response = sorlServer.query(solrQuery);

    final Result result = new Result();
    final SolrDocumentList documents = response.getResults();


... I don“t get the spaces (so I get "John") ... as if all values always get
a trim() before they are returned.

Any suggestions ? 
Is this a standard behavior ?

Best regards,

M. Hermann

Reply via email to