Create an Oracle Database 12c query that will be called from a Java web service

Cerrado Publicado Dec 2, 2015 Pagado a la entrega
Cerrado Pagado a la entrega

I have a web service in Java that performs searches on an Oracle 12c Database. The problem is I have a CONTAINS() search:

String query = "select * from user.my_table WHERE CONTAINS(my_clob_field, '" + searchString + "', 1) > 0";

but I also want to get the index(es) of the search word or phrase within each result.

Your task is to come up with a query, that can be called from a Java web service, that will do what the above query does, but will also return the indexes of the search word or phrase.

Background:

Currently what I've tried is to take each of the returned search results and go through them performing a REGEX search in Java to find the start and stop indexes needed to highlight the search result on the front end.

This works fine for regular text but if the requirement is that the user can search for any random arrangement of any characters (i.e. #<(F#><$*>/\./#&!)#}{}][s fdf) the Java search needs to also find that exact string and return the start and stop index.

I escape out any special characters for the Oracle search, but an entirely different set of rules is needed for the Java search to find the index. Trying to get them to match up has turned out to be a nightmare and typically the Java REGEX search doesn't find the same occurrences that the Oracle Database CONTAINS() search finds. I believe there should be some simple way to also get the indexes of the occurrences of the search word (or phrase).

Your task is to come up with a query, that can be called from a Java web service, that will do what the above query does, but most importantly, will also return the indexes of the search word or phrase.

For example, say one of the records from a CONTAINS() query has 3 occurrences of the search word in it. Your query would also return the start and stop indexes of each of the three occurrences within the CLOB field.

Programación de bases de datos Java Oracle SQL

Nº del proyecto: #9029233

Sobre el proyecto

13 propuestas Proyecto remoto Activo Jan 8, 2016

13 freelancers están ofertando un promedio de $156 por este trabajo

trustus

Hello, We will be happy to work with you. We have 80+ software engineers in our company. You will be able to communicate directly with the expert working on your project. We have a team of Skilled Java-J2EE p Más

$157 USD en 3 días
(78 comentarios)
7.7
prashushinde9

I want to discuss this project with you further, let me know the best suitable time for you to schedule the meeting, Feel free to message me at any time, i used to be online 14 hrs in a day on this website so probably Más

$257 USD en 10 días
(6 comentarios)
5.1
scorpioangry55

Hi, I'm certified Oracle DBA and Oracle developer since 2000. You can contact with me at any moment to discuss your task.

$250 USD en 10 días
(11 comentarios)
4.6
ref2

Hi I have 15+ years of experience in developing applications based on oracle database. I have bachelor degree in cs, 22 oracle certified courses and certificate for web app dev from university in Chicago. For your Más

$77 USD en 3 días
(26 comentarios)
4.4
dzdzegc

A proposal has not yet been provided

$110 USD en 3 días
(7 comentarios)
3.3
kurbsky

Besides CONTAINS(), Oracle supports REGEXP functions (since 10g); and I think these functions fit your task ideally.

$120 USD en 3 días
(5 comentarios)
1.7
voronkov

Hello! I think this problem can be solved on the oracle server side. I noticed that a search using the CONTAINS function on the side of Oracle you are satisfied with. If so, then all occurrences of the string can be re Más

$166 USD en 5 días
(2 comentarios)
0.8
AbhishekJuyal1

I have good knowledge of Java and Oracle . I already worked on Java , Oracle , Java Web services etc.

$133 USD en 3 días
(0 comentarios)
0.0
singlanittin1

I have good experience with SQL db and Java . Please allow me to take a look at your requirement. Please specify the time line that you accept it to be completed. Thanks

$155 USD en 3 días
(0 comentarios)
0.0
L1on

Hi, could make it within one day. For index you mean the position of symbol(s)/phrase(s) inside text right? --------------------------------------------------------------------------------------------------------- Más

$155 USD en 3 días
(0 comentarios)
0.0
mahimahesh88

A proposal has not yet been provided

$67 USD en 3 días
(0 comentarios)
0.0
jeyssonpaiva

We have experience in developing desktop application, web and mobile. We have a partnership with a company in northern Brazil, which is franchise of Coca-Cola Brazil.

$222 USD en 8 días
(0 comentarios)
0.0
natasaradmilovic

I have 10 years experience working in Oracle Database. I have 10 years experience iworking n Oracle Database.

$155 USD en 1 día
(0 comentarios)
0.0