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

Ditutup Disiarkan Dec 2, 2015 Dibayar semasa penghantaran
Ditutup Dibayar semasa penghantaran

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.

Pengaturcaraan Pangkalan Data Java Oracle SQL

ID Projek: #9029233

Tentang projek

12 cadangan Projek jarak jauh Aktif Jan 8, 2016

12 pekerja bebas membida secara purata $159 untuk pekerjaan ini

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 Lagi

$157 USD dalam 3 hari
(355 Ulasan)
8.6
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 Lagi

$257 USD dalam 10 hari
(6 Ulasan)
5.1
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 Lagi

$77 USD dalam 3 hari
(27 Ulasan)
4.6
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 dalam 10 hari
(11 Ulasan)
4.6
dzdzegc

A proposal has not yet been provided

$110 USD dalam 3 hari
(7 Ulasan)
3.3
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 Lagi

$166 USD dalam 5 hari
(2 Ulasan)
0.8
AbhishekJuyal1

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

$133 USD dalam 3 hari
(0 Ulasan)
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 dalam 3 hari
(0 Ulasan)
0.0
L1on

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

$155 USD dalam 3 hari
(0 Ulasan)
0.0
mahimahesh88

A proposal has not yet been provided

$67 USD dalam 3 hari
(0 Ulasan)
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 dalam 8 hari
(0 Ulasan)
0.0
natasaradmilovic

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

$155 USD dalam sehari
(0 Ulasan)
0.0