Solr - 突出显示

时间:2015-11-07 18:53:47

标签: solr lucene

我试图突出显示一个特别含有"细胞因子"的文件中的术语。在该文件中有几个单词的实例。我试过这样做:

http://localhost:8983/solr/Cytokine/select?q=cytokine&hl=true&hl.fl=content

在我得到的结果中:

<response>
<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">1</int>
<lst name="params">
<str name="q">cytokine</str>
<str name="hl">true</str>
<str name="hl.fl">content</str>
</lst>
</lst>
<result name="response" numFound="1" start="0">
<doc>
<arr name="title">
<str>
High Glucose Increases the Expression of Inflammatory Cytokine Genes in Macrophages Through H3K9 Methyltransferase Mechanism
</str>
</arr>
<arr name="content">
<str>
Recent studies ... SNIP ...in macrophages.
</str>
</arr>
<str name="id">c656ee36-bab5-4204-975d-80c720b50ec0</str>
<long name="_version_">1517203104151371776</long>
</doc>
</result>
<lst name="highlighting">
<lst name="c656ee36-bab5-4204-975d-80c720b50ec0"/>
</lst>
</response>

以下是文件:

{"title":"High Glucose Increases the Expression of Inflammatory Cytokine Genes in
Macrophages Through H3K9 Methyltransferase Mechanism","content":"Recent studies suggest that histone modification is one of the mechanisms
regulating inflammatory cytokine gene expression in hyperglycemic conditions.
However, it remains unknown how histone methylation is initiated and involved in 
changes of inflammatory cytokine gene expression under high glucose (HG)
conditions. Our aim was to investigate whether H3K9 methylation was involved in
HG-induced expression of inflammatory cytokines in macrophages. Expression
profile of cytokine genes under hyperglycemia in THP-1-derived macrophages was
determined by human cytokine antibody array. Based on the results from the human 
cytokine antibody array analyses, the H3K9me3 levels of 4 inflammatory cytokine
genes, including interleukin-6 (IL-6), IL-12p40, macrophage inflammatory
protein-1α (MIP-1α), and MIP-1β under HG were determined by ChIP assays.
Furthermore, the expression of these 4 inflammatory cytokine genes under either
HG or chaetocin (an inhibitor of SUV39H1 methyltransferase) exposure or
overexpression of SUV39H1 (a H3K9me3-specific methyltransferase) was analyzed by 
quantitative polymerase chain reaction. Macrophages cultured in HG conditions
showed increased gene expression and decreased H3K9me3 levels of inflammatory
cytokine genes compared with macrophages incubated in normal glucose (NG)
culture. Inhibition of SUV39H1 with chaetocin in NG-treated macrophages also
increased the expression of IL-6, IL-12p40, MIP-1α, and MIP-1β. Furthermore,
inhibition of SUV39H1 with chaetocin in HG-treated macrophages further increased 
the expression of these inflammatory cytokines. Contrarily, NG-treated
macrophages transfected with SUV39H1 plasmids show decreased expression of
inflammatory cytokines. Furthermore, overexpression of SUV39H1 in HG-treated
macrophages alleviated the expression of inflammatory cytokines under HG
conditions. Finally, HG also increases the expression of inflammation cytokines
in mouse bone marrow-derived macrophages. Our data demonstrated that HG increases
the expression of inflammatory cytokines in macrophages through decreased H3K9me3
levels, which was partly mediated by SUV39H1. Dysregulation of epigenetic histone
modification may be one of the underlying mechanisms for HG-induced inflammatory 
cytokine expression in macrophages."}

我做错了什么?

1 个答案:

答案 0 :(得分:0)

好吧,显然它必须是一个被标记化的字段,例如textfield并且必须存储它。这是一个例子:

<fieldType name="stringTokenized" class="solr.TextField" sortMissingLast="true">
    <analyzer>
      <tokenizer class="solr.WhitespaceTokenizerFactory"/>
    </analyzer>
  </fieldType>
  <field name="Title" type="stringTokenized" stored="true"/>

我的字段没有存储。一旦我这样做,我就可以查看这些片段

以下是一个有用的链接:Why is this simple Solr highlighting attempt failing?