Search for "related documents" as Altavista or Google do it? - Multimedia (formerly interMedia)(Archived)(Archived)

Hi,
does Intermedia Text support the search for a document that is similar to another one, which I have just found? Altavista and Google support this feature.
Can it be implemented using Intermedia Text (8.1.7 and above)?
Best regards,
~dietmar aust.

You can implement a more like this function using ctx_doc.themes.
The function works the following way: given a record (index name
and primary key), creates a theme search using the top n themes.
You can call it from the sql statment:
select * from mytable where contains(text, moreLikeThis(indexname, pk, n)) > 0
-- where n is the number of themes.

Related

Can't concatonate more than three items in a portal select statement ?

I'm running a Report from SQL query
as Far as I can tell you can't do;
select 'blah1'||name||'blah3'||'blah3'
from scott.emp
as soon as you put in a 4th item it fails.
It also fails using select concat (,)
I'm trying to run a report which selects a web address stored in a database table ie. http://www.yahoo.com and wrap it in html tags so it will appear as a link.
I've got to do it with more than three items because the only way to display the < in <ahref is to quote it seperately.
ie
'< '||'ahref='||ADDRESS FROM DATABASE||etc.etc.
anyone any ideas?
should i do it another way? 
Give an alias like this:
select 'blah1'||name||'blah3'||'blah3' col_alias
from scott.emp
It should not fail now. (U need to provide an alias if the length of the charachers is more than 32 characters).
Incase yu are still NOT able to solve this then cound you pls post the exact Query with error message and ur portal version.
Thanx,
Chetan. 
Hi,
You can try the following :
select ''||ADDRESS_ FROM_DATABASE||'' Alias from your_table;
Thanks
Vineet 
Let me explain a bit further.
If I want to display;
www.yahoo.com as a link I need add the html tags
Yahoo
www.yahoo.com is an entry in a database.
I want to select the entry www.yahoo.com from the database and concatonate it with the html tags.
ideally;
select 'Visit
This does not work
To concatonate characters like > in a select statement within portal you need to concat. seperately;
select '< '||'a href="'||ADDRESS FROM DATABASE||'"> '||'Visit< '||'/a> '
This does not work as you can't concat more than three items.
Could I write a trigger to add in the html tags to the data stored in the database, when data is entered via a portal form?
Again my problem is In need to add text to the start and end of the data being stored ie.
user enters www.yahoo.com in a form
a trigger or two converts that into;
Visit 
Hi,
I tried something like this
select ''||'Visit'||'' from dual
/
or for testing I select ename from scott.emp as follows:
select ''||'Visit'||'' from dual
/
Both work fine.
Thanks,
Anu
Whilst these statements work in SQL Plus or Toad, they don't work in the Portal enviroment. As soon as I concatonate a fourth item, the form fails after entering the sql statement.
Have you got this working in Portal?
If so what version are you using?
thanks 
Hi,
Sorry for the previous reply,I was trying it in sqlplus:
Here are the steps and it works fine thru portal.
1) I created a table called mytable which has values like
ename=oracle and url="http://www.oracle.com"
ename=rediff and url="http://www.rediff.com"
2) Create a SQL based Report as follows ,use a column alias:
select ename,''||url||'' anchor1 from achatter01a.mytable
3) Now go to the column formating section and select the "Display As" for anchor1 as HTML.
4) Click on Fast Finish.
5) Run it .
It works perfectly.
Hope this helps,
Anu 
Mine still doesn't work
I can do
select vendor||'randomtext'||'randomtext'||'randomtext'
from software
where sof_id=3
but I cannot do;
select vendor||'<a href='||randomtext'||'randomtext'
from software
where sof_id=3
as soon as I put in the < character I get an error
the only way to do it is '< ' || 'a href="'
but then I'm back to the problem of not being able to concat more than three items
what version are you using? 
Hi,
I tried the same on Portal 902 .
Thanks,
Anu 
I tried doing what anuradha has told in 3.0.9 and it works fine.The only problem I faced was when the table
myTable was not granted to the schema in which the application is made.
You better once grant the table to PUBLIC and try the same steps it works fine.The re is no problem in " > or < " special
characters.
rahul

Trick to add BR tags to text item description

Hi,
my endusers find it difficult to understand why a cariage return in the text and description of a text item is not shown in the resulting HTML. So I changed the before insert/update row triggers on WWV_THINGS (WWSBR_THIN_BRI_TRG and WWSBR_THIN_BRU_TRG). At the end of the trigger I added the following code (added spaces in the tags to prevent them from not showing in the browser):
-- Add a BR tag.
:new.description := replace(:new.description,chr(13),'< B R >'| |chr(13));
-- remove double BR tags.
:new.description := replace(:new.description,'< B R >< B R >'| |chr(13),'< B R >'| |chr(13));
-- remove double BR tags (lowercase).
:new.description := replace(:new.description,'< b r >< B R >'| |chr(13),'< B R >'| |chr(13));
This works nice for the description, but not for the text, since this is a CLOB column in wwv_text, and you cannot update CLOB columns in a trigger.
Some questions:
1. What does Portal development think of this solution ?
2. Does someone have a simmilar solution for the text of a text item ?
regards,
Willem-Pieter van der Lugt
Oracle Consulting NL 
You're hitting bug 1775682. If I read the bug correctly, it should be fixed in 3.1
Ton 
Hi Willem-Pieter,
I do not have a similar solution like the one you suggest, I guess there really isn't any at this moment, not for endusers.
What are the plans (timeframe, version) to incorperate a HTML editor in Portal? For endusers to make Portal a serious product for content management we really need this in stead of the current 'tips & tricks' approach (hide additional images, use HTML syntax etc.)
Thanks, Tony 
We're planning to support the HTML editor that's built into Internet Explorer in the 3.1 release of Portal, due out in the fourth quarter of 2001. If you've used Yahoo Mail with IE, you'll be familiar with this editor.
Note that the editor will only work with IE, as Netscape does not have an equivalent feature.
Regards,
Jerry 
I never heard about this built in HTML editor. Can I read about it somewhere?
Else there's a couple of good GNU HTML-editors that you possible could adopt into Portal.
http://sourceforge.net/projects/xsdheditor/
(preferrable)
http://sourceforge.net/projects/richtext/
(this one is slowly developed)
When is 3.1 planned to be released?

Problem in Markup with text tokens>1

Hi
I am using the text for searching the documents of type html in my web site.
The markup is working fine, when called with only single text token ie, "java". But it fails when called with more than one token, say "java vb", as this java and vb are coming in different places in the document. But it marks if both tokens are coming near.
Can any body tell me how to tackle the above scenario.
Hari
Could you please post a test case? 
Hi Omar
Here is it
This procedure works fine if it can exactly find the words to be marked up.
In other words this procedure expect the words to be adjacent otherwise it fails.
Egs:
begin
ctx_doc.markup('filenames_idx',
'1',
'induvidual profile',
'markuptab',0,false,
     'TEXT_DEFAULT',
'<i><font color=red>',
'</font></i>');
end;
In the above egs. the procedure expects the words "induvidual" "profile" next to next. if it is in different place it is not doing.
Please suggest me a way to do this.
Thanks
hari
In your example "individual profile" is the text query. Since it's a phrase search it will highlight individual close to profile.
Rememeber that in the query expresion you can use the other operators of Text (e.g., and, or, stemming, etc.). Try for example "individual and profile". 
HI Omar
It works thanku
K P Hari

MapViewer - Thematic mapping

Hi All
I'm looking at the MapViewer 904 preview with a view to using it for thematic mapping. So far the product looks great with some nice features and a great interface. There is (at least!) one thing which I can't seem to work out how to do though which I will attempt to explain here.
Our app allows users to pick parameters which are then submitted to an Oracle database for processing - the results can then be tabulated. What I hope to do though is to map them. The tricky part is that we have many simultaneous users and many combinations of layers and variables. What i'd like to do is build a "dynamic thematic map" where I can join the spatial table (eg. ZIPS) to my query results and thematically shade on the result value(s). I can see how to add themes dynamically (jdbc_query) but this doesn't seem to support any form of thematic shading that I can see, and I can add thematic maps via the map definition tool but this appears "fixed" in it's choice of table / column. I want the best of both worlds!!
If anyone can help it'd be appreciated..
Thanks
Steve Hall
I believe it can be done.
1. define an advanced style that will be used by the dynamic theme.
2. crate a regular jdbc_query theme except that:
- the style name will reference the advnaced style you
just created.
- add the attribute column(s) to the end of the SELECT
list of the query in your jdbc_query theme. These
attribute column(s) will then be used to shade the
dynamic theme.
Let me know if this does't work for you.
thanks,
LJ 
Hi LJ,
Thanks for the post - I was hoping it would be something (theoretically) this easy - but I can't seem to get it to work. I've used the MapDef tool to define my advanced style - called "BLACK_RANGE" - the XML from USER_SDO_STYLES is :
<?xml version="1.0" ?>
<AdvancedStyle>
<ColorSchemeStyle basecolor="#ffffff" strokecolor="#ff0000" >
<Buckets low="0.0" high="10000.0" nbuckets="5" />
</ColorSchemeStyle>
</AdvancedStyle>
Then my <theme> entry in the map request is :
<theme name="t2">
<jdbc_query label_column = "label"
label_style = "T.NICE"
spatial_column = "shape"
datasource = "geo_che"
render_style="BLACK_RANGE"
asis="FALSE">
SELECT g.geog2name,geog2name || ': '||results label,g.shape,r.results
FROM geog2 g, sample_results r
where g.geog2id = r.geogid
</jdbc_query>
</theme>
where "geog2" is my spatial table and "sample_results" is the data I want thematically mapped. I can join on an ID and the value I want to thematically shade upon is the "r.results" field. When I try this I get nothing back in my browser and looking in the mapviewer.log file on the server I can see :
[oracle.lbs.mapserver.oms, Tue Feb 25 07:48:35 GMT 2003, ERROR] cannot stream image data with unknown format
Does this mean anything to you? If I change the render_style to something more "normal" (e.g a color) then the request works fine. My image format is "PNG_STREAM" - interestingly if I change this to GIF_URL or PNG_URL the mapserver.log has nothing in it after the "time spent loading features" entry.
Thanks
Steve
Steve,
did you try drop g.geog2name from the select list? Basically, MapViewer considers every column in the select list that is not either spatial or label column to be an attribute column. In your case there are two attribute columns (g.geog2name, and r.results). Since your advanced style will consume one attribute column, in this case it probably picked up g.geog2name (since it comes before r.results in the SELECT). This probably isn't a numeric column and may have caused error when the advanced style try to use it.
so try with "SELECT geog2name || ': '||results label,g.shape,r.results FROM ..." and see what happens.
thanks,
LJ
Thanks LJ - that was it and it works great now. This is exactly what I wanted. I do have a couple of other questions though if you can help?!
1) Does Mapviewer support "Dot Density" thematic mapping? I can't see it documented anywhere but perhaps Oracle haven't got around to that yet.
2) In the same way as I am mapping here (dynamically) if I have multiple result columns, and a pie chart style, I guess the multiple results will be used as slices of the pie.
3) With the thematic range style i've been using here it always seems to be starting from white and going to the color I choose - can I make it go from gray to green say as opposed to always starting from white?
Many thanks again for your help
Steve
1) Does Mapviewer support "Dot Density" thematic mapping? I can't see it documented anywhere but perhaps Oracle haven't got around to that yet.
No. Not yet anyway.
2) In the same way as I am mapping here (dynamically) if I have multiple result columns, and a pie chart style, I guess the multiple results will be used as slices of the pie.
Yes that's right.
3) With the thematic range style i've been using here it always seems to be starting from white and going to the color I choose - can I make it go from gray to green say as opposed to always starting from white?
Maybe you can look into the collection style, which is a bit more tedius but gives you more control. Essentially you will be manually specifying the color value for each range (or bucket as we call it).
thanks,
LJ 
That's great - thanks for all your help LJ.

NULL_FILTER and ignore html tags

Hi gurus,
I have a couple of questions about ConText, I am not sure of:
1) is it possible to store a mix of plain text and html document in a CLOB column using NULL_FILTER.
2) If I would like to ignore all the tags in the html documents, do I do:
begin
ctx_ddl.create_section_group('htmlgroup','HTML_SECTION_GROUP');
end;
create index myindex on docs(thedocs) indextype is context parameters ('filter null_filter section group htmlgroup');
Can someone clarify for me. I am using oracle 8.1.7.
Thanks in advance.
Please ask questions about Oracle text (formerly interMedia text) in the Oracle text forum. You will get a quicker and more expert answer there.
Larry

Categories

Resources