You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Arlei Ferreira Farnetani Junior <fa...@gmail.com> on 2013/03/09 20:06:34 UTC

Complex Result with Fragment until break line

I have a system using Lucene where I need to get it besides me find
instances return the result cut correctly, or rather isolated properly
taking into account the line break.

I need Lucene me the results with the previous contents occurrences the
word found its start until the text (that would be before a line break) and
later also the name until a line break.


Imagine that I have a search by name: *JOHN MCCALEY*, in the following text
below:

------------------------------------------ Sample Page
-------------------------------------------------------------------------------------------------------------------------------------------

Proc. 0006018-56.2002.8.19.0001 (2002.001.002839-3) - Lawyer *John Mccaley*.
Judge defers the request for indemnification of its process.
The action is well founded and Attendance lawyer asks the Principal Civil
Court.
Proc. 0002678-94.1974.8.19.0001 (1974.001.700621-8) (22618) -
Inventariante: LIA BUONOMO MENDONÇA, Herdeiro: ESPÓLIO DE RENATO BUONOMO
MENDONÇA, Herdeiro: ESPÓLIO DE ANTÔNIO BUONOMO MENDONÇA (Adv(s). Dr(a).
ANGELA HARA BUONOMO MENDONÇA (OAB/RJ-033658) X EGÍDIO MENDONÇA THURLER E
OUTRO Aos interessados sobre custas judiciais para remessa ao Contador.
<break-line>
Proc. 0003018-56.2002.8.19.0001 (2002.001.002839-3) -
*JOHN MCCALEY* E OUTROS X AURORA ALVES DA COSTA GODINHO (Adv(s). Dr(a).
MURILO ESTEVES DE CARVALHO (OAB/RJ-044537I) MARIA REGINA DE BRITO COLLACO
VERAS E OUTROS, Dr(a). DEBORA LUCENA SANCHES
(OAB/RJ-131493) AOS DESARQUIVAMENTO DOS AUTOS.
INTERESSADOS SOBRE
<break-line>
Proc. 0005018-56.2002.8.19.0001 (2002.001.002839-3) - Lawyer *John Mccaley*.
Judge dismissed the revision of alimony to the defendant Michael Mcnamara.
<break-line>
Proc. 0003586-44.1980.8.19.0001 (1980.001.301189-5) (33200) -
Inventariante: MARIA CELINA DE OLIVEIRA LOURENCO MARQUES MOURO X JOSE MARIA
E OUTRO (Adv(s). Dr(a). GILDA PAIVA LOURENCO (OAB/RJ-039004) Herdeiro:
AMÉRICO LOURENÇO, Herdeiro: JULIO LOURENÇO Aos interessados sobre custas
judiciais para remessa ao Contador.
<break-line>
Proc. 0005979-14.1995.8.19.0001 (1995.001.005484-8) (24385) - *JOHN
MACCALEY *X EMILIA DA SILVA (Adv(s). Dr(a). SUELY TEODORO NARDY DA SILVA
(OAB/RJ-049396), Dr(a). OSWALDO DA COSTA CORREA (OAB/RJ-029067) Aos
interessados sobre custas judiciais para remessa ao Contador.
<break-line>
Proc. 0028813-88.2007.8.19.0001 (2007.001.027610-8) -
ALEXANDRE MOURA DUMANS E OUTRO (Adv(s). Dr(a). CARLOS ROBERTO FERREIRA
BARBOSA MOREIRA (OAB/RJ-061492) X HENRIQUETA DE MOURA SILVA Despacho: 1)
Fls. 263/264 - Oficie-se na forma requerida.2) Após, intimem-se os
interessados sobre o ofício de fls. 265.
<break-line>

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

I need Lucene I clipped the result, ie, he can catch the beginning of the
text before the name *JOHN MCCALEY* until the end of the text after the
name,
I mean that the end of the text is a line break.

*This is possible with Lucene?* Can anyone give any examples of how I could
do this? Recalling that the result has to come to the end
of the sentence before the line break and not just a piece cutting words.

Thanks a lot.
farnetani@gmail.com