You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Walter Closenfleight <wa...@gmail.com> on 2011/06/29 19:40:32 UTC

Methods for preserving text entities?

We have some text entities in fields to index (and search) like so:

<field name="text">Solr is a really &myword; search engine!</field>

I would like to preserve/protect &myword; and not resolve it in the indexing
or search results.

What sort of methods have people used? I realize the results are returned in
XML format, so preserving these text entities may be hard. Are people
replacing the "&" character or doing something else?

Thanks in advance!

Re: Methods for preserving text entities?

Posted by Walter Closenfleight <wa...@gmail.com>.
Ah, I think I suddenly answered my own question, but appreciate further
insight if you have it. I converted the & in &myword; to an &amp; so it
looks like this:

 <field name="text">Solr is a really &amp;myword; search engine!</field>



On Wed, Jun 29, 2011 at 12:40 PM, Walter Closenfleight <
walter.p.closenfleight@gmail.com> wrote:

> We have some text entities in fields to index (and search) like so:
>
> <field name="text">Solr is a really &myword; search engine!</field>
>
> I would like to preserve/protect &myword; and not resolve it in the
> indexing or search results.
>
> What sort of methods have people used? I realize the results are returned
> in XML format, so preserving these text entities may be hard. Are people
> replacing the "&" character or doing something else?
>
> Thanks in advance!
>