title: SOLR - match tags against text
body: <p>I have the <code>tags</code> solr collection with 100k records. It has simple structure, example node:</p>
  
  <pre><code>{
      "id": "57301",
      "name": "Roof repair",
  }
  </code></pre>
  
  <p>The task is - automatically bind tag list for any input text using solr search engine. Now our algorithm is.</p>
  
  <ol>
  <li>First we send whole text as query to <code>tags</code> collection. We are searching whole text in "name" field. We recive a big list of tags. </li>
  <li>Send requests in a cycle (loop tags, recived at step1), to another collection, that contains the document with input text (id is known). Example query 
  <code>id:38373 AND _text_:"Roof repair"</code> . If this query gives any results - will we add <code>Roof repair</code> to matched tags.</li>
  </ol>
  
  <p>Finaly - we have a checked tag list for given input text. Quality of this automatic tag binding is good (for us of course). </p>
  
  <p>But we have a performance problem: some texts have 10k tags on step 1. Then each tag checking in step2 with http request to solr. 10k requests is very much. We can to crop tags count to analyse, but tag-linking quality becomes much worse.</p>
  
  <p>Is there way to match solr tag collection against text without cyclic request for each tag?</p>